Fallback to current song waveforms in song preview
@@ -144,6 +144,10 @@ const preview = (note, type, instrument, square2, waves = []) => {
console.log(note, instrument, square2);
const noteFreq = note2freq[note];
+ if (waves.length === 0) {
+ waves = current_song.waves;
+ }
+
switch (type) {
case "duty":
if (!square2) {
