abc2svg
Check-in [429f935b53]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:play: fix: bad setting of volume to 0 since previous commits Path submitted by Avetik. Thanks.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1: 429f935b53769471ea49f00804e50b0fcff1b606
User & Date: jef 2026-10-17 17:24:45.915
Context
2026-10-17
17:24
play: fix: bad setting of volume to 0 since previous commits ... (Leaf check-in: 429f935b53 user: jef tags: trunk)
2026-10-15
09:06
play: midi: play a bit louder ... (check-in: ec16c57be1 user: jef tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to util/sndaud.js.
︙︙
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
				if (ac.state === "suspended")
					ac.resume()
// iOS explicitly needs an unlock buffer; on other platforms this is harmless and 
// improves reliability when tempo is very slow. 
				play_unlock()
			}
			gain = ac.createGain()
			gain.gain.value = conf.gain || .7
		}

		while (i_start.noplay)
			i_start = i_start.ts_next
		po = {
			conf: conf,	// configuration
			onend: conf.onend || empty,







|







619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
				if (ac.state === "suspended")
					ac.resume()
// iOS explicitly needs an unlock buffer; on other platforms this is harmless and 
// improves reliability when tempo is very slow. 
				play_unlock()
			}
			gain = ac.createGain()
			gain.gain.value = conf.gain ?? .7
		}

		while (i_start.noplay)
			i_start = i_start.ts_next
		po = {
			conf: conf,	// configuration
			onend: conf.onend || empty,
︙︙
Changes to util/sndmid.js.
︙︙
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

		t *= 1000		// convert to ms
		d *= 1000

		mutone(k, a, t)		// handle microtone accidentals

		po.op.send(new Uint8Array([0x90 + c, k,
				(po.conf.gain || .7) * 127]), t)	// note on
		po.op.send(new Uint8Array([0x80 + c, k, 0]), t + d - 20) // note off
	} // note_run()

	// send a MIDI control
	function midi_ctrl(po, s, t) {
		po.op.send(new Uint8Array([0xb0 + po.v_c[s.v],
					s.ctrl, s.val]),







|







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

		t *= 1000		// convert to ms
		d *= 1000

		mutone(k, a, t)		// handle microtone accidentals

		po.op.send(new Uint8Array([0x90 + c, k,
				(po.conf.gain ?? .7) * 127]), t)	// note on
		po.op.send(new Uint8Array([0x80 + c, k, 0]), t + d - 20) // note off
	} // note_run()

	// send a MIDI control
	function midi_ctrl(po, s, t) {
		po.op.send(new Uint8Array([0xb0 + po.v_c[s.v],
					s.ctrl, s.val]),
︙︙