Skip to content

Commit a9e5490

Browse files
committed
Fix MIDI import setting pitch of all notes to +1
The MIDI import code was passing a `true` parameter as the note pitch, which should be the value for something else. Since true = 1, all notes generated by it were receiving that pitch. Also fixed descriptions of some functions missing parameters. Discovered while testing #108
1 parent 9fead0c commit a9e5490

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

scripts/add_block/add_block.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// add_block(x, y, ins, key, vel, pan, [insnum])
1+
// add_block(x, y, ins, key, vel, pan, pit, [insnum])
22
var a, b, c, xx, yy, ins, key, vel, pan, pit, insnum;
33
xx = argument[0]
44
yy = argument[1]

scripts/add_block_select/add_block_select.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// add_block_select(x, y, ins, key, vel, pan)
1+
// add_block_select(x, y, ins, key, vel, pan, pit)
22
var a, b, c, xx, yy, ins, key, vel, pan, pit;
33
xx = argument0
44
yy = argument1

scripts/import_midi/import_midi.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ for (t = 0; t < midi_tracks; t += 1) {
130130
// Add block, go lower if failed
131131
a = 0
132132
while (1) {
133-
if (add_block(pos, yy, instrument_list[| ins], note, vel, 100, true)) break
133+
if (add_block(pos, yy, instrument_list[| ins], note, vel, 100, 0, true)) break
134134
yy += 1
135135
a += 1
136136
if (a >= w_midi_maxheight && w_midi_maxheight < 20) break

scripts/open_schematic/open_schematic.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ with (new(obj_dummy)) {
444444
if (debugstr) str += chr(13) + chr(10) + "Added note block no. " + string(queuenoteblocks) + "!"
445445
with (obj_controller) {
446446
d = sqrt(2000 * 256 * 2000)
447-
while (!add_block(start + cd, b, instrument_list[| a], c)) b += 1
447+
while (!add_block(start + cd, b, instrument_list[| a], c, 100, 100, 0)) b += 1
448448
}
449449
break
450450
}

0 commit comments

Comments
 (0)