Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

Guidelines/Rubrics Changes - posted on 16th Jun 2017 at 5:09 PM
Quick Reply
Search this Thread
Replies: 50 (Who?), Viewed: 3827 times.
Page 1 of 3
Inventor
Original Poster
#1 Old 6th Jun 2017 at 8:52 AM Last edited by Arsil : 17th Jun 2017 at 8:10 AM.
Default Musical Instruments Mod - Technical Info thread
I'll use this thread for technical info about the mod (LINK )
so the description in the download page is less packed and more end-user friendly.

NOTE: I'd have no problem if this were to go on even when I'm not around any more.

Coordination: people currently helping on what
- icemunmun : flute (mesh)
- mspoodle1 : sax (mesh)

Index:
Coding
Object Creation
Clips (Animations)
Audio Encoding
TunesDataBase xml editing
...
Flute Discussion
...

Areas that could use non technical help:
(maybe for these things would be better to open a new thread elsewhere and keep this for technical stuff)
  • Check size and proportion of the instruments compared among them and based on average height
    (adult Sims are about 1.87 tiles, sometimes referred to as meters, so about 6.13 feet)
  • Check prices of instruments, compared with the official ones
  • Choosing copyright free songs. Must obviously be solos where only that particular instrument plays,
    I would hate to waste the time of contributors for an instrument that has no songs to be used with.
    I'd like of course classical, but I guess also jazz and other genres are ok to make the list
    more varied. I'm not very knowledgeable about music.

Price for instruments in relation to the official ones:
- flute 150 ???
- guitar 600
- violin 600
- keyboard 700
- bass guitar 750
- drums 875
- piano 5000
Advertisement
Inventor
Original Poster
#2 Old 6th Jun 2017 at 8:53 AM Last edited by Arsil : 13th Jun 2017 at 9:35 AM.
Default Coding
Inventor
Original Poster
#3 Old 6th Jun 2017 at 8:53 AM
Default Object Creation
Inventor
Original Poster
#4 Old 6th Jun 2017 at 8:53 AM Last edited by Arsil : 13th Jun 2017 at 10:03 AM.
Default Clips (Animations)
Inventor
Original Poster
#5 Old 6th Jun 2017 at 8:54 AM Last edited by Arsil : 13th Jun 2017 at 10:50 AM.
Default Audio Encoding
I suggest using audio with a duration of about 1 real time minute.

With the default tipping tuning, to make sure that a song has always
the chance to get a tip, the duration must be at least 30 sim-minutes.

At normal speed, 1 real time minute duration (1:13) roughly translates to 1 sim-hour (your mileage may vary).
Using a faster speed actually increases the duration (the audio playing can't really be quickened).

Inventor
Original Poster
#6 Old 6th Jun 2017 at 8:54 AM Last edited by Arsil : 13th Jun 2017 at 9:54 AM.
Default TunesDataBase xml
Inventor
Original Poster
#7 Old 6th Jun 2017 at 9:06 AM Last edited by Arsil : 6th Jun 2017 at 6:18 PM.
meshing....

General Info...

To give me an easier time making the animations (not sure if the system I'm
using allows to move/rotate them - when they are parented to the Sim's slot - by changing
the values of the offsetBone bone in the _RIG resource, like it does for DriedFood for example),
objects must have a specific position (check how the flute is not centered on the x=0 and z=0)
and be "facing up" (this would be especially important for sax and trumpet).
Inventor
Original Poster
#8 Old 6th Jun 2017 at 9:06 AM Last edited by Arsil : 17th Jun 2017 at 8:10 AM.
Default Flute
Flute

Placeholder version: LINK

Inventor
Original Poster
#9 Old 6th Jun 2017 at 9:27 AM Last edited by Arsil : 6th Jun 2017 at 9:58 AM.
Default Clarinet


NOTE: for now, I'll focus on the flute (if there's interest in the mod).
I'm not sure I have enough stamina to make assets for all 5 instruments.
Inventor
Original Poster
#10 Old 6th Jun 2017 at 9:27 AM Last edited by Arsil : 6th Jun 2017 at 9:57 AM.
Default Oboe


NOTE: for now, I'll focus on the flute (if there's interest in the mod).
I'm not sure I have enough stamina to make assets for all 5 instruments.
Inventor
Original Poster
#11 Old 6th Jun 2017 at 9:28 AM Last edited by Arsil : 6th Jun 2017 at 9:58 AM.
Default Sax


NOTE: for now, I'll focus on the flute (if there's interest in the mod).
I'm not sure I have enough stamina to make assets for all 5 instruments.
I sure would like to try this though.
Inventor
Original Poster
#12 Old 6th Jun 2017 at 9:28 AM Last edited by Arsil : 6th Jun 2017 at 6:21 PM.
Default Trumpet


NOTE: for now, I'll focus on the flute (if there's interest in the mod).
I'm not sure I have enough stamina to make assets for all 5 instruments.
Inventor
Original Poster
#13 Old 6th Jun 2017 at 9:59 AM Last edited by Arsil : 7th Jun 2017 at 6:25 AM.
Question: If you simply move or rotate a mesh with MilkShape (or Blender)
and then update the MODL/MLOD resources with this modified version, does
the existing UV mapping get preserved or you have to re-make the textures?
Inventor
Original Poster
#14 Old 7th Jun 2017 at 3:04 PM Last edited by Arsil : 8th Jun 2017 at 1:01 PM.
It's a bit of a stretch, but I've added coding support to 2 new instruments: maleMike and femaleMike.
The game messages would still be related to playing instruments,
but these could be used to make Sims sing instead of play.

Sing with or without accompanying music? Copyright problems?
I don't know, we'll see when and if we get there.

They can share the same mesh but use 2 different OBJD and OBJK.
Obviously it has to be a portable and cordless mike (the mod is limited to that ATM).

They can share the same set of animations using the string mike
(not that having different animations for male and female Sims would be a bad idea,
but this reduces the work to do).

-----

I've removed the tune Anadolia and I'm currently testing 8 new tunes for the flute
(2 per each level), the list is heavily classical music oriented. The .package file
with just the audio is about 6MB.

I've cut some of them because they seemed too long. Some were longer than the
one I've used in the first release, Anadolia, which was about 2 min and 10 sec and
seemed endless to me. The new ones are on average 1 min long and I'm checking,
among other things, if all of them, except the 2 used at level 0 who are about 30
seconds long, are long enough to get tips.

-----

The download page should be back soon.
EDIT: Or not, I've asked to keep it on hold until a serious issue get fixed. See next post.
Inventor
Original Poster
#15 Old 8th Jun 2017 at 9:01 AM Last edited by Arsil : 13th Jun 2017 at 11:33 AM.
Damn it. I'm experiencing sporadic crashes when a song ends.

This has nothing to do with the mod itself, I think it has to do with the pre or post audio encoding,
i.e. the format/settings of the mp3 to be encoded and/or the (lack of) hex editing on the .snr file.

If it wasn't already crystal clear, I don't know shit about digital audio.

Observations and possible causes:
  • Maybe I'm over-reacting, maybe it was just that single audio file whose encoding somehow
    went wrong. Wishful thinking for the win! I need to stress-test it more, I'm tempted to release
    the updated version here to get help with that (hehe, as if people would be happy to wait for
    the game to load, wait for the game to crash and start over again).
  • The game crashes when the audio ends or is about to end.
    No error messages and no logs. Not from NRaas ErrorTrap at least (which makes sense),
    I haven't really looked for other kind of logs (and they wouldn't probably help me much).
  • In one of the thread about audio encoding, lenglel suggests to use 128bps or lower
    as Bit Rate Mode (SOURCE), others seemed to get good results with that,
    but the original tutorial by FlyBy says to use variable and others seemed to get
    good results with that.. I have always used variable.
  • When encoding, should I use the --single-block option or not? I've always used it.
    The help of the ealayer3 command (I use version 0.6.2) simply says that using that
    Create a stream to be loaded in memory. Not sure what it means.
    A snr file created without that option is bigger. Example:
    - 655K noSingleBlock.snr (uses header starting with 00 00 ... this could actually be header-less)
    - 640K singleBlock.snr (uses header starting with 05 04 AC 44 00 ...)
    I've always used that option for encoding.
  • Looks like the audio must use a stereo track, audio with a mono track seems to regularly
    make the game crash. All the new audio files I'm currently testing were originally mono,
    I used the steps described HERE to turn them into stereo.
    Could that be a problem or there are no relevant differences between a file who was
    originally stereo and one which was turned from mono to stereo using that method?
    Let me reiterate what I've already mentioned: I don't know shit about digital audio.
    If I had to guess, I'd say it's the latter (no difference).
  • Never* had a crash with the audio file used in the first release of the mod, Anadolia,
    which was originally a midi file (.mid) converted to mp3, exported with Audacity as mp3
    using the suggested options and then encoded.

    Never* had a crash with the music for the Limbo mod, which was also originally a midi.
    In that mod the audio was played in a loop, a fact that may or may not be relevant
    since the crash happens when the audio ends and a looping audio may have
    a "different way" of ending, if that makes any sense.
    By the way, in that mod too the audio doesn't survive a save+reload (if you save the
    game while the music is playing, when you reload that game the audio is muted).

    *Sometimes I'm not the more attentive person in the world, so maybe it happened
    and I didn't notice.

    Of course this is hardly solid proof for anything, it could just be a coincidence:
    maybe those files too can make the game crash given enough time/chances
    or maybe the fact that they were originally midi files has nothing to do with it.
  • Hex editing of the .snr file

    The header, the first 8 bytes of the .snr file.

    I've already mentioned that the header of core snr files used for sound effects and instrument's songs
    are different than that generated with the encoding process. Maybe there's more to it.

    Haven't used an hex editor to change that "00" to "40" as suggested in the original tutorial by FlyBy
    (I didn't do that for the music of the Limbo mod)
    (I did that for the songs of the Japanese Stereo Station mod).

    EDIT : I checked and I wasn't remembering correctly the meaning of that change.
    Quote:
    Originally Posted by Original FlyBy Tutorial
    [...]we have to change the byte at address 04 into '40' in order to tell the engine that this is a header and not a file containing
    sound-data.
    So that operation is used only when you have a .snr and a sns file, doing it here makes no sense.

    Haven't added that extra chunk of data to the file as suggested in the original tutorial by Flyby
    (I didn't do that for the music of the Limbo mod)
    (I didn't do that for the songs of the Japanese Stereo Station mod).
  • Should I try using both a .snr file and a .sns file? My understanding is that they are used only for
    stereo station songs and maybe (haven't checked) for background music, jukebox and similar.
    They are definitely not used for musical instruments' songs.

    On the other hand, looks like most sound effects and all (?) band instruments' songs use the
    EA XAS ADPCM codec, so at this point I could try using that codec or keep using the ealayer3
    codec but with both .snr and .sns files.

I'll re-read the whole thread with the tutorial (and other relevant ones) to look for clues, if I find a way
to iron out the potential causes of the crashes, I'll update the encoding guide in the post above.

This sure was an unexpected twist, I thought I had this audio encoding shit under control.
The fact that there is people helping to make/improve the instruments makes it tenfold more disheartening.
I sadly have to suggest to temporarily stop all activities because if this problem is not solved
it is a deal breaker and I don't want their generosity, enthusiasm, skill, time and efforts to be wasted.

EDIT:
I've abandoned my experimental (more like delusional) encoding process
and gone back to the traditional one (.snr + .sns file).
But no hex editing of the .sns file (adding that chunk of code, it was never
explained what that was for) since music seems to play well without it.
Inventor
Original Poster
#16 Old 8th Jun 2017 at 9:05 AM Last edited by Arsil : 9th Jun 2017 at 11:49 AM.
Aaaaanyway... let's leave that excessive drama behind us.

I'll post the updated mod to see if there someone willing to test it.
I have a bad record with things like this, usually no one ever replies [PITY-BAITING 101].

It's tuned to have all songs available from the start (the tag kTimesToLevelUp is set to 0
in the CONFIGURATION xml) without having to "level-up".

For the record, the audio who made the game crash was that for Old MacDonald had a farm*
but I suspect it was just a coincidence, potentially all of them can make the game crash.

*Hehe, I didn't find a flute version of "twinkle twinkle little star" to use as level 0 tune. I remember
that was the very first song used in school when I was 10 years old to learn how to play a flute,
the lamest existing model of a flute, a green monstrosity.

NOTE: if you leave the game running in the background (no focus in the window, so no sound)
the game will probably not crash despite going on for sim-days with Sims playing autonomously.

Now that I think about it, I've used only 1 Sim (with the Virtuoso trait) for testing,
maybe giving a flute to more Sims can help. Not exactly sure what that would
help to accomplish though... uhm... I lost my train of thought.

CHANGELOG
  • Now uses a gameplay oriented xml tuning (instead of the testing purposes one).
    ****** EXCEPT FOR LEVEL-UP AS MENTIONED ABOVE
  • Moved localization (i18n) from the xml to the classic STBLs resources.
  • Selectable Sims are notified when "their" playing ability increases and when RH concerts are unlocked.
  • Payment for half-assed concerts is now halved instead of getting no money at all.
  • Cooldown tooltip now shows how many hours remain before being able to perform another concert.
    Featuring the programming [in]famous "1 hours" message!
  • It's a bit of a stretch, but I've added coding support to the instruments "maleMike" and "femaleMike"
    to make Sims sing (but you'll still get messages related to playing an instrument).
  • Different instruments can now share the same set of animations.
  • BugFix: when playing autonomously, the interaction's name was empty.
  • Error reports when parsing the TunesDataBase now mention the name of the tune
    (in addition to the row of the table) to help spot the faulty entry in the xml db.
  • New flute "playlist" (classical music oriented) with 8 tunes, two per each level.
    ****** Tired of the same old gameplay? Put some excitement in your sessions:
    ****** EACH TUNE CAN MAKE YOUR GAME CRASH! FUUUUUUUUUUUUUUUUU**!

EDIT: I'm also interested in knowing if a tune ends with some weird (sometimes scratchy) sound.
That might be caused by the absence of silence or sound fading at the end.

EDIT2: use this version of the mod but overwrite the _Audio package with the one uploaded in
this post: http://modthesims.info/showthread.p...060#post5223060

EDIT3: Nope, too prone to accidental mistakes. I'll re-upload everything in that post.
Scholar
#17 Old 8th Jun 2017 at 4:31 PM
I do not know if I can be much help here as I know nothing about building mods. I did install the four files and tested the flute. I had my sim play all the available music start to finish and the music selections and audio is wonderful. The animation looked great but I'm not sure if it is intended to have the hands move while playing. It looked and sounded awesome to me. My game did not crash and I was able to save and quit without any issues. Also, no script errors were generated.

If there is something else I can try with the flute let me know. Also would be happy to test the other instruments when they are ready. Is there something I need to download and install for the other instruments. Not sure how to proceed.

Thank you so much for this Arsil and looking forward to see what comes next
Inventor
Original Poster
#18 Old 8th Jun 2017 at 5:27 PM Last edited by Arsil : 8th Jun 2017 at 5:38 PM.
Welcome on board ^^

Wow, thanks, you put a smile on my face, but, for your own good, please refrain your optimism
(which is appreciated, by the way). Keep testing the mod, it will eventually make the game crash.
If you can, try to keep track of which tunes cause the crash. For what is worth, because I'm afraid
it's all of them.

The flute is the only instrument currently available.

The animations are still placeholders:
- they look stiff because only the upper part of the body moves
- the left arm is weirdly/unnaturally rotated/twisted.
- no finger movement
- no blowing mouth/lips (and overall no facial expressions/variations)
Well, even if I try my best, I'm not so good to make all these things look much better anyway.

If I can say so myself, the flow of movements so far isn't half bad. It's generated by randomly
picking one of 3 different looping animations (they each have a different chance to be chosen).

Before putting more effort into them I'd like to have a more detailed mesh (not that I can see it
while I'm making the animations... but maybe that's because I'm still a Blender newbie), so I
can fine tune them based on the position of the flute's "mouth hole" and "buttons" (I don't know
how they are called technically). Or at least that was the plan before discovering the crashes...
* gets depressed again after the brief respite
MakeNeedsStaticOn
staff: moderator
#19 Old 8th Jun 2017 at 6:51 PM
I actually wouldn't mind trying out making the animations, I've followed a few character animation lessons before (Though that was with Maya, not blender) I studied (But still study it) anatomy too though that's just for art purposes lol. However, I'm pretty familiar with blender so I wouldn't mind giving the animations a try and making poses for the sims. (I haven't really shared any though) Oh! And I actually played the flute myself, wasn't that great at it, but I know how to play it. In case you were looking for someone who could do them for you.

If you do, then I have a few questions:

- Do you want them to be more... like, cartoon-ish as in, let's say TS4's animations where they're a bit overdone but fun to look at. Or just go with a more simple, realistic movements?
- Do you have a limit for how many random clips you want?

Unless someone else wants to volunteer of course!
Scholar
#20 Old 8th Jun 2017 at 7:59 PM
Love to see you smile Arsil. My apologies but I am a hopeless optimist. To me, Murphy was an optimist :D. I do realize my testing was limited to one world one household but I was absolutely thrilled with the music selections and the audio. I am familiar with the music selections and my sim didn't miss a beat playing.

Other than to keep testing I was not sure if you wanted me to test more and/or other situations. I will keep testing the flute in other households/other worlds. Will let you know when/if it crashes along with the details on the music selection and anything else that was going on before a crash.

BTW, the animations are not half bad at all. In fact if what I am seeing is the way it needs to work, no complaints here.
Instructor
#21 Old 8th Jun 2017 at 8:19 PM Last edited by icemunmun : 8th Jun 2017 at 8:53 PM.
Here are some of the concept art of the flute I am following as a base. Sadly my game is crashing ( with memory exceeded error of all things thanks to huge amount of CC which I am trying frantically to reduce...I so wish the game could use my 16 GB RAM ). So I am unable to test at the moment but I may just mesh first(till I get the green signal from Arsil)

The fourth and fifth picture shows how I want the flute to end up looking like. Its okay right ?

Quote:
Originally Posted by Greenplumbbob
Oh! And I actually played the flute myself, wasn't that great at it, but I know how to play it.


One silly question - How many 'holes' are there in the whole contraption in neutral position ? Two ? One through which wind is blown and one at the end ? ( Sorry..I am clueless about the western classical flute ...we have more of the basic wooden variety of flute played more commonly in my part of the world )
Screenshots
Inventor
Original Poster
#22 Old 8th Jun 2017 at 8:33 PM Last edited by Arsil : 8th Jun 2017 at 9:24 PM. Reason: typos and grammar and rephrasing
EDIT: I'm getting forum-sick again. I'm spending so much time writing that
in the meantime 2 other posts were made. That's a bad sign.

[I'm answering to Greenplumbbob]

Thanks for the offer, it's much appreciated. And I would gladly accept it, but I don't want
anyone to make any kind of commitment for the time being, not until the problem with the
audio is resolved. I've asked the people who already offered to help to be on stand-by.
I don't want their work to go to waste.

Anyway, just for sake of argument.
Quote:
Do you want them [the animations] to be more... like, cartoon-ish as in, let's say TS4's animations where
they're a bit overdone but fun to look at. Or just go with a more simple, realistic movements?

The latter, but that's just my personal preference. If you were to make them I won't put any restraint
on your creativity. Ok, I'm lying, I'll become such a pain in the butt that you'll hate me.
Anyway, nothing would prevent you or anyone else to make them available as alternative, but frankly
at this point that sounds like a luxury and a misuse of human resources.

Quote:
Do you have a limit for how many random clips you want?

The thing is that the mod right now is pretty simple, so the number of clips must be the same for
each instrument. Of course this is easily solvable with a more flexible code, but that can be done
later. I probably got this backwards, it would be better to design a flexible system from the start
but, hey, I'm not a good planner. To answer your questions: 3 clips.
If you have enough energy to do more, you could do the animations for a second instrument
(not available at this time).

Quote:
Unless someone else wants to volunteer of course!

I never hoped that someone would offer to make the animations.
You are doing it on purpose only because the mod seems hopeless now, aren't you? :P
My grandest fantasies where limited to getting a little help from pose makers - calling them "posers"
would be inappropriate, right? - to get a few frames to use as a reference (for the blowing
mouth/lips when playing the flute, for instance).
Truth be told, I may have become a little invested in the flute animations myself and I wouldn't mind
to try making an improved version of them, so maybe you could wait when a new instrument is
available or maybe we could do the flute ones together (honestly I doubt I can animate well the
fingers for example). I'll try not to be a jerk, but for full disclosure I have to tell you that I may
have traumatized some of my past close collaborators... That said, in an ideal world my work
with this mod is done and other people would do all the objects, animations and audio.

Like I said this was just for the sake of argument. All the plans are on hold.
I know that I sounded a bit defeated and pessimistic here and in my previous posts, but I don't
want the time and efforts that I've invested in this to go to waste either. Now I'm a bit distracted
by other things, but I'll soon put back all my focus on this.

-----

Anyway, since you seems to know Blender better than me, let me ask you a question:
is there a way to attach/parent a (bone/joint of a) mesh to a bone/joint of another mesh?
So that when such bone/joint (the slot on the right hand of the Sim) moves then the
attached/parented mesh (the flute) will follow suit? Sorry for the poorly phrased explanation.

The Blender plugin (the one for animations/poses by "A") has the option "Load CAS"
to add a CASP item and "attach" it to the Sim mesh (to specific bones depending on the item).
So in theory it's possible. Is something like that doable with regular (non CASP) objects?
That would be such a great help, because that way I could actually see where the heck
the flute (or any other object) ends up when, for instance, I change the arm position
so I could avoid sticking it into the Sim's nose.
Inventor
Original Poster
#23 Old 8th Jun 2017 at 8:56 PM
Quote:
Originally Posted by icemunmun
The fourth and fifth picture shows how I want the flute to end up looking like. Its okay right ?

It is. But, please, don't make anything yet. Of course I can't stop you, but be aware that you may
end up creating a decorative object. Nothing against them, I like them as the next simmer.
Instructor
#24 Old 8th Jun 2017 at 8:58 PM
Quote:
Originally Posted by Arsil
It is. But, please, don't make anything yet. Of course I can't stop you, but be aware that you may
end up creating a decorative object. Nothing against them, I like them as the next simmer.


No issue! Right now I just like the challenge of making something I haven't actually held in my hand in any way! Best of luck!
MakeNeedsStaticOn
staff: moderator
#25 Old 8th Jun 2017 at 9:15 PM
Nah that's fine by me! I totally understand and I don't you're a jerk!

Aanyways, regarding the blender question. Actually, there is. Though what the CASP option for blender does, is basically importing 2 of the same rigs (so the entire sim rig all over again, over the, well, actual sim) and indeed merge them together. However, this is more of a reference option since the CLIP animation tool pretty much ignores the CASP after export. I thyink you have to make a different sim-rig for that which I guess, is something waay beyond anyone's knowledge because then we'd be dealing with engine stuff I think.

Though, I think the option you're looking for is the ctrl+P? From what I understand from what you're trying to explain. It basically gives the mesh a bone, or merges it with the sim's body. Depending on what option you choose of course!
Page 1 of 3
Back to top