File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,9 @@ def find_loudest_freq_index_in_bucket(slice_index: int, bucket_index: int) -> in
106106 print (f"{ bucket :>16} " , end = "" )
107107 print ()
108108
109- sound_instruction_buffers = ["hex`" ] * len (frequency_buckets )
109+ # Start with empty buffers instead of "hex`"
110+ sound_instruction_buffers = ["" for _ in range (len (frequency_buckets ))]
111+
110112 for slice_index in range (len (loudest_frequencies )):
111113 if debug_output :
112114 print (f"{ slice_index :<6} " , end = "" )
@@ -126,9 +128,11 @@ def find_loudest_freq_index_in_bucket(slice_index: int, bucket_index: int) -> in
126128 print ("0 Hz 0 amp" .rjust (16 ), end = "" )
127129 if debug_output :
128130 print ()
129- sound_instruction_buffers = [buffer + "`" for buffer in sound_instruction_buffers ]
130131
131- # TypeScript output (no f-strings to avoid syntax errors)
132+ # Properly wrap in hex`...`
133+ sound_instruction_buffers = [f"hex`{ buffer } `" for buffer in sound_instruction_buffers ]
134+
135+ # TypeScript output
132136 code = (
133137 "namespace music {\n "
134138 " //% shim=music::playInstructions\n "
You can’t perform that action at this time.
0 commit comments