instruments.mq using new definition syntax; fixed windows builds

This commit is contained in:
Robert Bendun 2022-10-21 17:50:25 +02:00
parent 7621e6e3ff
commit f10eb5c2ad
3 changed files with 134 additions and 129 deletions

5
examples/random-rythm.mq Normal file
View File

@ -0,0 +1,5 @@
for (up 10) [ n |
snd := c + (shuffle (up 12)).0;
oct := if (n % 2 == 0) [ 3 ] [ 4 ];
play (snd oct qn);
];

View File

@ -4,161 +4,161 @@ This may be unsupported by your device.
--------------------------------------------------------- ---------------------------------------------------------
-- Piano ------------------------------------------------ -- Piano ------------------------------------------------
var AcousticGrandPiano = 0; AcousticGrandPiano := 0;
var BrightAcousticPiano = 1; BrightAcousticPiano := 1;
var ElectricGrandPiano = 2; ElectricGrandPiano := 2;
var HonkyTonkPiano = 3; HonkyTonkPiano := 3;
var RhodesPiano = 4; RhodesPiano := 4;
var ChorusedPiano = 5; ChorusedPiano := 5;
var Harpsichord = 6; Harpsichord := 6;
var Clavinet = 7; Clavinet := 7;
-- Chromatic percussion --------------------------------- -- Chromatic percussion ---------------------------------
var Celesta = 8; Celesta := 8;
var Glockenspiel = 9; Glockenspiel := 9;
var MusicBox = 10; MusicBox := 10;
var Vibraphone = 11; Vibraphone := 11;
var Marimba = 12; Marimba := 12;
var Xylophone = 13; Xylophone := 13;
var TubularBells = 14; TubularBells := 14;
var Dulcimer = 15; Dulcimer := 15;
-- Organ ------------------------------------------------ -- Organ ------------------------------------------------
var HammondOrgan = 16; HammondOrgan := 16;
var PercussiveOrgan = 17; PercussiveOrgan := 17;
var RockOrgan = 18; RockOrgan := 18;
var ChurchOrgan = 19; ChurchOrgan := 19;
var ReedOrgan = 20; ReedOrgan := 20;
var Accordion = 21; Accordion := 21;
var Harmonica = 22; Harmonica := 22;
var TangoAccordion = 23; TangoAccordion := 23;
-- Guitar ----------------------------------------------- -- Guitar -----------------------------------------------
var AcousticGuitarNylon = 24; AcousticGuitarNylon := 24;
var AcousticGuitarSteel = 25; AcousticGuitarSteel := 25;
var ElectricGuitarJazz = 26; ElectricGuitarJazz := 26;
var ElectricGuitarClean = 27; ElectricGuitarClean := 27;
var ElectricGuitarMuted = 28; ElectricGuitarMuted := 28;
var OverdrivenGuitar = 29; OverdrivenGuitar := 29;
var DistortionGuitar = 30; DistortionGuitar := 30;
var GuitarHarmonics = 31; GuitarHarmonics := 31;
-- Bass ------------------------------------------------- -- Bass -------------------------------------------------
var AcousticBass = 32; AcousticBass := 32;
var ElectricBassFingered = 33; ElectricBassFingered := 33;
var ElectricBassPicked = 34; ElectricBassPicked := 34;
var FretlessBass = 35; FretlessBass := 35;
var SlapBass1 = 36; SlapBass1 := 36;
var SlapBass2 = 37; SlapBass2 := 37;
var SynthBass1 = 38; SynthBass1 := 38;
var SynthBass2 = 39; SynthBass2 := 39;
-- Solo strings ----------------------------------------- -- Solo strings -----------------------------------------
var Violin = 40; Violin := 40;
var Viola = 41; Viola := 41;
var Cello = 42; Cello := 42;
var Contrabass = 43; Contrabass := 43;
var TremoloStrings = 44; TremoloStrings := 44;
var PizzicatoStrings = 45; PizzicatoStrings := 45;
var OrchestralHarp = 46; OrchestralHarp := 46;
var Timpani = 47; Timpani := 47;
-- Ensamble --------------------------------------------- -- Ensamble ---------------------------------------------
var StringEnsemble1 = 48; StringEnsemble1 := 48;
var StringEnsemble2 = 49; StringEnsemble2 := 49;
var SynthStrings1 = 50; SynthStrings1 := 50;
var SynthStrings2 = 51; SynthStrings2 := 51;
var ChoirAahs = 52; ChoirAahs := 52;
var VoiceOohs = 53; VoiceOohs := 53;
var SynthVoice = 54; SynthVoice := 54;
var OrchestraHit = 55; OrchestraHit := 55;
-- Brass ------------------------------------------------ -- Brass ------------------------------------------------
var Trumpet = 56; Trumpet := 56;
var Trombone = 57; Trombone := 57;
var Tuba = 58; Tuba := 58;
var MutedTrumpet = 59; MutedTrumpet := 59;
var FrenchHorn = 60; FrenchHorn := 60;
var BrassSection = 61; BrassSection := 61;
var SynthBrass1 = 62; SynthBrass1 := 62;
var SynthBrass2 = 63; SynthBrass2 := 63;
-- Reed ------------------------------------------------- -- Reed -------------------------------------------------
var SopranoSax = 64; SopranoSax := 64;
var AltoSax = 65; AltoSax := 65;
var TenorSax = 66; TenorSax := 66;
var BaritoneSax = 67; BaritoneSax := 67;
var Oboe = 68; Oboe := 68;
var EnglishHorn = 69; EnglishHorn := 69;
var Bassoon = 70; Bassoon := 70;
var Clarinet = 71; Clarinet := 71;
-- Pipe ------------------------------------------------- -- Pipe -------------------------------------------------
var Piccolo = 72; Piccolo := 72;
var Flute = 73; Flute := 73;
var Recorder = 74; Recorder := 74;
var PanFlute = 75; PanFlute := 75;
var BlownBottle = 76; BlownBottle := 76;
var Shakuhachi = 77; Shakuhachi := 77;
var Whistle = 78; Whistle := 78;
var Ocarina = 79; Ocarina := 79;
-- Synth lead ------------------------------------------- -- Synth lead -------------------------------------------
var Lead1Square = 80; Lead1Square := 80;
var Lead2Sawtooth = 81; Lead2Sawtooth := 81;
var Lead3Calliope = 82; Lead3Calliope := 82;
var Lead4Chiff = 83; Lead4Chiff := 83;
var Lead5Charang = 84; Lead5Charang := 84;
var Lead6Voice = 85; Lead6Voice := 85;
var Lead7Fifths = 86; Lead7Fifths := 86;
var Lead8BassLead = 87; Lead8BassLead := 87;
-- Synth pad -------------------------------------------- -- Synth pad --------------------------------------------
var Pad1NewAge = 88; Pad1NewAge := 88;
var Pad2Warm = 89; Pad2Warm := 89;
var Pad3Polysynth = 90; Pad3Polysynth := 90;
var Pad4Choir = 91; Pad4Choir := 91;
var Pad5Bowed = 92; Pad5Bowed := 92;
var Pad6Metallic = 93; Pad6Metallic := 93;
var Pad7Halo = 94; Pad7Halo := 94;
var Pad8Sweep = 95; Pad8Sweep := 95;
-- Synth effects ---------------------------------------- -- Synth effects ----------------------------------------
var FX1Train = 96; FX1Train := 96;
var FX2Soundtrack = 97; FX2Soundtrack := 97;
var FX3Crystal = 98; FX3Crystal := 98;
var FX4Atmosphere = 99; FX4Atmosphere := 99;
var FX5Brightness = 100; FX5Brightness := 100;
var FX6Goblins = 101; FX6Goblins := 101;
var FX7Echoes = 102; FX7Echoes := 102;
var FX8SciFi = 103; FX8SciFi := 103;
-- Ethnic ----------------------------------------------- -- Ethnic -----------------------------------------------
var Sitar = 104; Sitar := 104;
var Banjo = 105; Banjo := 105;
var Shamisen = 106; Shamisen := 106;
var Koto = 107; Koto := 107;
var Kalimba = 108; Kalimba := 108;
var Bagpipe = 109; Bagpipe := 109;
var Fiddle = 110; Fiddle := 110;
var Shanai = 111; Shanai := 111;
-- Percussive ------------------------------------------- -- Percussive -------------------------------------------
var TinkleBell = 112; TinkleBell := 112;
var Agogo = 113; Agogo := 113;
var SteelDrums = 114; SteelDrums := 114;
var Woodblock = 115; Woodblock := 115;
var TaikoDrum = 116; TaikoDrum := 116;
var MelodicDrum = 117; MelodicDrum := 117;
var SynthDrum = 118; SynthDrum := 118;
var ReverseCymbal = 119; ReverseCymbal := 119;
-- Sound effects ---------------------------------------- -- Sound effects ----------------------------------------
var GuitarFretNoise = 120; GuitarFretNoise := 120;
var BreathNoise = 121; BreathNoise := 121;
var Seashore = 122; Seashore := 122;
var BirdTweet = 123; BirdTweet := 123;
var TelephoneRing = 124; TelephoneRing := 124;
var Helicopter = 125; Helicopter := 125;
var Applause = 126; Applause := 126;
var Gunshot = 127; Gunshot := 127;

View File

@ -1,5 +1,5 @@
CC=i686-w64-mingw32-gcc CC=i686-w64-mingw32-gcc
CXX=i686-w64-mingw32-g++ CXX=i686-w64-mingw32-g++
CPPFLAGS:=$(CPPFLAGS) -D__WINDOWS_MM__ CPPFLAGS:=$(CPPFLAGS) -D__WINDOWS_MM__
LDLIBS:=-lwinmm $(LDLIBS) -static-libgcc -static-libstdc++ LDLIBS:=-lwinmm $(LDLIBS) -static-libgcc -static-libstdc++ -static
Target=musique.exe Target=musique.exe