-
Notifications
You must be signed in to change notification settings - Fork 2
How to Add New Notes
MyLegGuy edited this page Jul 28, 2018
·
2 revisions
assets/Free/Scripts/init.lua
defines some useful functions for adding new notes. To add new notes, edit init.lua
and add code to the end.
addTripleNotes(_soundFormat, _startId, _filenameNormal, _filenameSharp, _filenameFlat, _audioGearSymbol)
- Adds a regular triple (flat, normal, sharp) note.
- First argument is a format string for the sound filenames that is relative to the exe file.
- For example, "assets/Proprietary/Sound/piano_%d.wav"
- This will load wav files that have the filename...
- piano_.wav
- This will load wav files that have the filename...
- To figure out what to do here, first find the sound files for the note you want to add in Growtopia's files.
- Once you've done that, the files should be named something like trumpet_x.wav
- Obviously, that's an example if Growtopia added trumpet notes.
- Copy the new sound files to the place where the rest of the sound files are in Growtopia Music Simulator Final
- This is ./assets/Proprietary/Sound/
- Then, for the format string, just copy this piano one but replace "piano" with the filename of the note.
- "assets/Proprietary/Sound/piano_%d.wav"
- "assets/Proprietary/Sound/trumpet_%d.wav"
- "assets/Proprietary/Sound/piano_%d.wav"
- Once you've done that, the files should be named something like trumpet_x.wav
- For example, "assets/Proprietary/Sound/piano_%d.wav"
- Second argument is the note ID for the first of the 3 notes. You should choose the next free note ID.
- The guitar notes have IDs 20, 21, and 22. If I were to add a new note after guitar notes, I would put the first note ID as 23.
- The third, fourth, and fifth arguments are the paths for the note images.
- Paths are relative to where the exe file is.
- Examples are:
- "assets/Proprietary/Images/piano.png"
- "assets/Proprietary/Images/pianoSharp.png"
- "assets/Proprietary/Images/pianoFlat.png"
- Examples are:
- Paths are relative to where the exe file is.
- The sixth argument is the notes' letter in the audio gears.
- For example, with piano this is "P", with bass this is "B", with flute this is "F".
- You can leave this argument out if this note can't be used in the audio gear
- First argument is a format string for the sound filenames that is relative to the exe file.
addSingleNote(_soundFormat, _noteId, _filenameNormal)
- Adds a note that's alone, it doesn't have a sharp or flat friend.
- _soundFormat works the same as it does in addTripleNotes, read about that.
- _noteId works the same as it does in addTripleNotes, read about that.
- _filenameNormal works the same as it does in addTripleNotes, read about that.
- Example for festive/winterfest notes:
- addSingleNote("assets/Proprietary/Sound/festive_%d.wav",19,"assets/Proprietary/Images/festive.png");
How to add a note with half as many sounds, like drums. This is rare and probably not what you want. But if it is, just copy, paste, and then edit this code:
-- do edit this
myNoteID = <whatever note ID you need to use>
myAudioGearSymbol = "<whatever audio gear symbol>"
myAudioFormatString = "assets/Proprietary/Sound/<whatever filename>_%d.wav"
myImagePath = "assets/Proprietary/Images/<whatever filename>.png"
-- dont edit this
myNoteArray = {};
myNoteArray = sortLoadedSounds(loadHalfSounds(myAudioFormatString));
addNote(myNoteID,loadImage(myImagePath),myNoteArray);
setGearInfo(myNoteID,myAudioGearSymbol,'-');