phetsims / quadrilateral

"Quadrilateral" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

Rename sound files and sound designs in code? #346

Closed jessegreenberg closed 1 year ago

jessegreenberg commented 1 year ago

We have two sound designs that are moving toward production. One about "layers" and one about volume emphasis. The used to be part of a "tracks" category of prototypes but we no longer use anything other than "tracks".

The "layers" design is called TRACKS_BUILD_UP_SIMPLE in code. Can I rename it to something like SOUND_LAYERS? The "volume emphasis" design is called TRACKS_VOLUME_EMPHASIS. Can I rename it to something like SOUND_EMPHASIS?

The sound files are named like this because they were pulled from other prototypes/designs as we developed the sim. Would it make sense to rename these sound files to indicate how they are used at this point? image

jessegreenberg commented 1 year ago

I think renaming the sound design constants/files is important. The only reason not to rename the sound files is in case that is useful to map back to design history or find the same file in google drive or something like that?

brettfiedler commented 1 year ago

Absolutely to changing the sound designs and I'm good with your proposals, @jessegreenberg .

For the individual tracks, I suspect it might be good to note something about the tracks quality, rather than just numerically incrementing. It'd be good to show in this issue the renaming for archival purposes and link back to the design issue (which I won't tag just yet).

I'll give this a shot tomorrow or rope in @Ashton-Morris to come up with clever names to append to quadTrack[UsefulName].mp3

brettfiedler commented 1 year ago

Okay, I took a not really great stab at this. Tried to make them more meaningful than they were before but it turns out my musical/sound language is lacking.

@Ashton-Morris, would you like to refine these a bit? You can edit this comment directly or copy/paste the markdown to edit the table yourself.

Old Name New Name
1 quadBeatTracksBuildingBaseRhythm quadTrackBackgroundRhythmComplex
2 quadBeatTracksBuildingBuildingTracks000 quadTrackLowAscendingFourNotes
3 quadBeatTracksBuildingBuildingTracks002 quadTrackHighTonesAmbient
4 quadBeatTracksBuildingBuildingTracks003 quadTrackHighDescendingPingRepeats
5 quadBeatTracksBuildingBuildingTracks004 quadTrackHighBellsFallAndRise
6 quadBeatTracksBuildingBuildingTracks005 quadTrackLowPunctualBoops
7 quadBeatTracksBuildingBuildingTracks006 quadTrackLowDistortedTonalRhythm
8 quadMelodyTracks004 quadTrackHighBellsShortLoop
9 quadSimpleBuildingTracks006 quadTrackLowPunctualBoopsSparse
10 quadSimpleBuildingTracks007 !!! This is the same as track on row 7 !!!
11 quadBaseBeatSimpler.mp3 quadTrackBackgroundRhythmSimple
12 quadBaseBeatSimplerConcaveQuadrilateralJustRhythmV2 quadTrackBackgroundRhythmInverted
13 quadSimpleBuildingTracks004Trapezoid quadTrackHighRepeatedMonotoneRinging
14 grabHighPitch n/a
15 quadShapeCollision n/a

@jessegreenberg, I realized that two of the files are actually the same track, they just use different file names depending on the sound design.. (sorry, my bad). You can

That'll take us down teensy bit in size too.

jessegreenberg commented 1 year ago

I like those a lot! Ill wait for @Ashton-Morris to give thoughts before doing any renaming.

Ashton-Morris commented 1 year ago

I like it a lot too! I have no changes to suggest.

jessegreenberg commented 1 year ago

OK, code classes and names have been renamed. Lets make sure #345 is OK first before renaming files in sim. If we make more changes to the sound files Ill need to rename them again pulling them from google drive.

brettfiedler commented 1 year ago

While I was making changes related to #345, I went ahead and made some changes to the mappings in EmphasisTracks to better align them with LayerTracks. Files and Indices are ordered more similarly to LayerTracks. I also adjusted some volumes while I was listening and comparing to LayerTracks.\

Edit: Side note, it's super easy to see where to change things!! Code cleanup must be going well.

jessegreenberg commented 1 year ago

Alright, #345 is wrapping up, lets finish this.

jessegreenberg commented 1 year ago

Alright! Thanks for doing https://github.com/phetsims/quadrilateral/issues/346#issuecomment-1416231185 @BLFiedler those look great and its much easier to identify the sounds now. Can you please have a listen to the sound designs and make sure that I renamed the files and usages correctly without accidentally swapping a sound in the design?

brettfiedler commented 1 year ago

Everything seems to match what I remember. We'll see if anyone pings anything as funny, but good to close!