include "standard.mut"; // Set up the PC Speaker extension pcSpeaker = true; pitCycle = s/(157500000/11/12); // ~1.193MHz minPotential = 1; maxPotential = 76; sample = pitCycle*maxPotential; // ~15.7K samples per second, same as the CGA line rate tick = sample*262; // ~59.92 ticks per second, same as the CGA frame rate division = tick*6; voices = 1; // Any additional voices will be arpeggioed on the last voice (Monotone style, not .mod style) amplitudeBaked = true; frequencyBaked = true; outputSimulatedWave = "mut_output_pcspeaker.wav"; outputSimulatedWaveRate = outputWaveRate; outputSimulatedWaveBits = outputWaveBits; outputSimulatedWaveChannels = outputWaveChannels; outputPCSpeakerBin = "mut_output_pcspeaker.bin"; outputPCSpeakerScore = "mut_output_pcspeaker_score.dat"; outputPCSpeakerSampleBank = "mut_output_pcspeaker_sample_bank.dat"; squareWavesOnly = false; allowRingModulation = false; sampleSize = tick/sample; sampleBankSize = 65536; // TODO: We'd also like to output the amount of CPU time used. // Set up the tuning system. We'll base it around C being the frame rate, // which is about 1.5 semitones sharper than standard C. We'll also use just // intonation instead of equal temperament. These changes should make it sound // "cleaner", especially for music composed in C. unison = 1; octave = 2; fifth = 3/2; fourth = 4/3; majorThird = 5/4; majorSixth = 5/3; minorThird = 6/5; minorSixth = 8/5; majorSecond = 9/8; minorSeventh = 16/9; minorSecond = 16/15; majorSeventh = 15/8; tritone = 45/32; C2 = 1/tick; G2 = fifth*C2; D2 = majorSecond*C2; A2 = majorSixth*C2; E2 = majorThird*C2; B2 = majorSeventh*C2; F#2 = tritone*C2; C#2 = minorSecond*C2; G#2 = minorSixth*C2; D#2 = minorThird*C2; A#2 = minorSeventh*C2; F2 = fourth*C2; C1 = C2/2; G1 = G2/2; D1 = D2/2; A1 = A2/2; E1 = E2/2; B1 = B2/2; F#1 = F#2/2; C#1 = C#2/2; G#1 = G#2/2; D#1 = D#2/2; A#1 = A#2/2; F1 = F2/2; C0 = C1/2; G0 = G1/2; D0 = D1/2; A0 = A1/2; E0 = E1/2; B0 = B1/2; F#0 = F#1/2; C#0 = C#1/2; G#0 = G#1/2; D#0 = D#1/2; A#0 = A#1/2; F0 = F1/2; C3 = C2*2; G3 = G2*2; D3 = D2*2; A3 = A2*2; E3 = E2*2; B3 = B2*2; F#3 = F#2*2; C#3 = C#2*2; G#3 = G#2*2; D#3 = D#2*2; A#3 = A#2*2; F3 = F2*2; C4 = C3*2; G4 = G3*2; D4 = D3*2; A4 = A3*2; E4 = E3*2; B4 = B3*2; F#4 = F#3*2; C#4 = C#3*2; G#4 = G#3*2; D#4 = D#3*2; A#4 = A#3*2; F4 = F3*2; C5 = C4*2; G5 = G4*2; D5 = D4*2; A5 = A4*2; E5 = E4*2; B5 = B4*2; F#5 = F#4*2; C#5 = C#4*2; G#5 = G#4*2; D#5 = D#4*2; A#5 = A#4*2; F5 = F4*2; C6 = C5*2; G6 = G5*2; D6 = D5*2; A6 = A5*2; E6 = E5*2; B6 = B5*2; F#6 = F#5*2; C#6 = C#5*2; G#6 = G#5*2; D#6 = D#5*2; A#6 = A#5*2; F6 = F5*2; C7 = C6*2; G7 = G6*2; D7 = D6*2; A7 = A6*2; E7 = E6*2; B7 = B6*2; F#7 = F#6*2; C#7 = C#6*2; G#7 = G#6*2; D#7 = D#6*2; A#7 = A#6*2; F7 = F6*2; C8 = C7*2; G8 = G7*2; D8 = D7*2; A8 = A7*2; E8 = E7*2; B8 = B7*2; F#8 = F#7*2; C#8 = C#7*2; G#8 = G#7*2; D#8 = D#7*2; A#8 = A#7*2; F8 = F7*2; C9 = C8*2; G9 = G8*2; D9 = D8*2; A9 = A8*2; E9 = E8*2; B9 = B8*2; F#9 = F#8*2; C#9 = C#8*2; G#9 = G#8*2; D#9 = D#8*2; A#9 = A#8*2; F9 = F8*2;