├── src ├── ext │ ├── resource.h │ ├── resource.rc │ └── giada.ico ├── gui │ ├── types.h │ ├── dialogs │ │ ├── about.h │ │ ├── warnings.h │ │ ├── missingAssets.h │ │ ├── bpmInput.h │ │ ├── midiIO │ │ │ ├── midiOutputSampleCh.h │ │ │ ├── midiOutputMidiCh.h │ │ │ ├── midiInputBase.h │ │ │ └── midiInputBase.cpp │ │ ├── browser │ │ │ ├── browserDir.h │ │ │ ├── browserLoad.h │ │ │ ├── browserSave.h │ │ │ ├── browserDir.cpp │ │ │ └── browserLoad.cpp │ │ ├── beatsInput.h │ │ ├── actionEditor │ │ │ ├── midiActionEditor.h │ │ │ └── sampleActionEditor.h │ │ ├── channelNameInput.h │ │ ├── pluginChooser.h │ │ ├── progress.h │ │ ├── pluginWindow.h │ │ └── config.h │ ├── elems │ │ ├── basics │ │ │ ├── browser.h │ │ │ ├── slider.h │ │ │ ├── tabs.h │ │ │ ├── progress.h │ │ │ ├── scrollbar.h │ │ │ ├── dial.h │ │ │ ├── slider.cpp │ │ │ ├── progress.cpp │ │ │ ├── box.h │ │ │ ├── boxtypes.h │ │ │ ├── check.h │ │ │ ├── textButton.h │ │ │ ├── scrollbar.cpp │ │ │ ├── boxtypes.cpp │ │ │ ├── tableWidget.h │ │ │ ├── imageButton.h │ │ │ └── tabs.cpp │ │ ├── actionEditor │ │ │ ├── legend.h │ │ │ ├── envelopePoint.h │ │ │ ├── sampleAction.h │ │ │ ├── envelopePoint.cpp │ │ │ ├── pianoItem.h │ │ │ ├── velocityEditor.h │ │ │ └── gridTool.h │ │ ├── mainWindow │ │ │ ├── mainMenu.h │ │ │ ├── keyboard │ │ │ │ ├── groupChannelButton.h │ │ │ │ ├── midiChannelButton.h │ │ │ │ ├── groupChannel.h │ │ │ │ ├── sampleChannelButton.h │ │ │ │ ├── channelProgress.h │ │ │ │ ├── midiChannel.h │ │ │ │ ├── sampleChannelMode.h │ │ │ │ ├── groupChannelButton.cpp │ │ │ │ ├── channelButton.h │ │ │ │ └── sampleChannel.h │ │ │ ├── scenes.h │ │ │ ├── mainTransport.h │ │ │ ├── mainInput.h │ │ │ └── mainOutput.h │ │ ├── panTool.h │ │ ├── config │ │ │ ├── stringMenu.h │ │ │ ├── tabMisc.h │ │ │ ├── tabPlugins.h │ │ │ ├── tabBehaviors.h │ │ │ └── tabBindings.h │ │ ├── volumeTool.h │ │ ├── midiActivity.h │ │ ├── soundMeter.h │ │ ├── sampleEditor │ │ │ ├── shiftTool.h │ │ │ └── rangeTool.h │ │ ├── plugin │ │ │ └── pluginParameter.h │ │ ├── keyBinder.h │ │ └── playButton.h │ └── updater.h ├── core │ ├── model │ │ ├── loadState.cpp │ │ ├── behaviors.h │ │ ├── sharedLock.h │ │ ├── sharedLock.cpp │ │ ├── kernelMidi.h │ │ └── loadState.h │ ├── init.h │ ├── pan.h │ ├── confFactory.h │ ├── channels │ │ ├── midiChannel.cpp │ │ ├── midiLightning.cpp │ │ ├── midiChannel.h │ │ └── midiLightning.h │ ├── rendering │ │ ├── midiAdvance.h │ │ ├── sampleAdvance.h │ │ ├── pluginRendering.h │ │ └── midiAdvance.cpp │ ├── worker.h │ ├── patchFactory.h │ ├── midiLearnParam.h │ ├── plugins │ │ └── pluginState.h │ ├── midiLearnParam.cpp │ ├── patch.cpp │ ├── actions │ │ └── action.h │ └── idManager.cpp ├── utils │ ├── ver.h │ ├── string.h │ ├── cocoa.mm │ ├── vector.h │ ├── time.h │ ├── cocoa.h │ ├── time.cpp │ ├── fs.h │ └── log.cpp ├── aliases.h ├── glue │ └── storage.h ├── main.cpp └── scene.h ├── extras ├── giada.icns ├── giada-logo.png ├── giada-logotype.png └── com.giadamusic.Giada.desktop ├── tests ├── resources │ └── test.wav ├── main.cpp ├── patch.cpp ├── mocks │ └── kernelMidiMock.h ├── version.cpp ├── wave.cpp ├── channelFactory.cpp ├── midiEvent.cpp ├── waveFactory.cpp └── waveReading.cpp ├── .clang-format └── vcpkg.json /src/ext/resource.h: -------------------------------------------------------------------------------- 1 | #define IDI_ICON1 101 2 | -------------------------------------------------------------------------------- /src/ext/resource.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | IDI_ICON1 ICON DISCARDABLE "giada.ico" -------------------------------------------------------------------------------- /extras/giada.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/HEAD/extras/giada.icns -------------------------------------------------------------------------------- /src/ext/giada.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/HEAD/src/ext/giada.ico -------------------------------------------------------------------------------- /extras/giada-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/HEAD/extras/giada-logo.png -------------------------------------------------------------------------------- /extras/giada-logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/HEAD/extras/giada-logotype.png -------------------------------------------------------------------------------- /tests/resources/test.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/HEAD/tests/resources/test.wav -------------------------------------------------------------------------------- /tests/main.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | #define CATCH_CONFIG_FAST_COMPILE 3 | #include -------------------------------------------------------------------------------- /tests/patch.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/patch.h" 2 | #include 3 | 4 | TEST_CASE("Patch") 5 | { 6 | using namespace giada; 7 | 8 | SECTION("version") 9 | { 10 | Patch patch; 11 | patch.version = {0, 16, 0}; 12 | 13 | REQUIRE(patch.version < Version{1, 0, 0}); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/mocks/kernelMidiMock.h: -------------------------------------------------------------------------------- 1 | #ifndef G_TESTS_KERNELMIDI_MOCK_H 2 | #define G_TESTS_KERNELMIDI_MOCK_H 3 | 4 | #include "../../src/core/midiEvent.h" 5 | 6 | namespace giada::m 7 | { 8 | class KernelMidiMock 9 | { 10 | public: 11 | void send(const MidiEvent& e) 12 | { 13 | sent.push_back(e); 14 | } 15 | 16 | std::vector sent; 17 | }; 18 | } // namespace giada::m 19 | 20 | #endif -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Microsoft 3 | AccessModifierOffset: -4 4 | AlignAfterOpenBracket: 'false' 5 | AlignConsecutiveAssignments: 'true' 6 | AlignConsecutiveDeclarations: 'true' 7 | AllowShortFunctionsOnASingleLine: All 8 | BreakBeforeBraces: Allman 9 | BreakConstructorInitializers: BeforeComma 10 | ColumnLimit: 0 11 | ConstructorInitializerIndentWidth: '0' 12 | IndentWrappedFunctionNames: 'false' 13 | Language: Cpp 14 | NamespaceIndentation: None 15 | PointerAlignment: Left 16 | UseTab: ForIndentation 17 | LambdaBodyIndentation: OuterScope 18 | -------------------------------------------------------------------------------- /tests/version.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/version.h" 2 | #include 3 | 4 | TEST_CASE("Version") 5 | { 6 | using namespace giada; 7 | 8 | Version version{1, 0, 0}; 9 | 10 | SECTION("Test comparison") 11 | { 12 | REQUIRE(version == Version{1, 0, 0}); 13 | REQUIRE(version != Version{0, 0, 0}); 14 | REQUIRE(version != Version{0, 1, 0}); 15 | REQUIRE(version != Version{0, 0, 1}); 16 | REQUIRE(version < Version{1, 0, 1}); 17 | REQUIRE(version < Version{1, 1, 0}); 18 | REQUIRE(version < Version{2, 0, 0}); 19 | } 20 | 21 | SECTION("Test to string") 22 | { 23 | REQUIRE(version.toString() == "1.0.0"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /extras/com.giadamusic.Giada.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=Giada 5 | GenericName=Drum machine and loop sequencer 6 | GenericName[de]=Drum Maschine und Loop Sequenzer 7 | GenericName[es]=Caja de ritmos y secuenciador de loops 8 | GenericName[fr]=Boîte à rythme et séquenceur de boucle 9 | Comment=Drum machine and loop sequencer 10 | Comment[de]=Drum Maschine und Loop Sequenzer 11 | Comment[es]=Caja de ritmos y secuenciador de loops 12 | Comment[fr]=Boîte à rythme et séquenceur de boucle 13 | Exec=giada %f 14 | Terminal=false 15 | Icon=giada 16 | Categories=Music;AudioVideo;Audio;Midi;X-Digital_Processing;X-Jack;X-MIDI; 17 | Keywords=midi;jackd;alsa;pulse;audio;sound;loop; 18 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "giada", 3 | "version-string": "1.0", 4 | "builtin-baseline": "f6a5d4e8eb7476b8d7fc12a56dff300c1c986131", 5 | "dependencies": [ 6 | "fmt", 7 | "catch2", 8 | "nlohmann-json", 9 | "libsamplerate", 10 | { 11 | "name": "rtmidi", 12 | "platform": "linux", 13 | "features": [ 14 | "alsa" 15 | ] 16 | }, 17 | { 18 | "name": "rtmidi", 19 | "platform": "!linux" 20 | }, 21 | { 22 | "name": "libsndfile", 23 | "features": [ 24 | "external-libs" 25 | ] 26 | } 27 | ], 28 | "overrides": [ 29 | { 30 | "name": "fmt", 31 | "version": "12.0.0" 32 | }, 33 | { 34 | "name": "rtmidi", 35 | "version": "6.0.0" 36 | }, 37 | { 38 | "name": "catch2", 39 | "version": "3.11.0" 40 | }, 41 | { 42 | "name": "libsamplerate", 43 | "version": "0.2.2" 44 | }, 45 | { 46 | "name": "nlohmann-json", 47 | "version": "3.12.0" 48 | }, 49 | { 50 | "name": "libsndfile", 51 | "version": "1.2.2" 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /tests/wave.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/wave.h" 2 | #include 3 | #include 4 | 5 | TEST_CASE("Wave") 6 | { 7 | using namespace giada; 8 | 9 | static const int SAMPLE_RATE = 44100; 10 | static const int BUFFER_SIZE = 4096; 11 | static const int CHANNELS = 2; 12 | static const int BIT_DEPTH = 32; 13 | 14 | /* Each SECTION the TEST_CASE is executed from the start. Any code between 15 | this comment and the first SECTION macro is executed before each SECTION. */ 16 | 17 | SECTION("test allocation") 18 | { 19 | m::Wave wave(ID{1}); 20 | wave.alloc(BUFFER_SIZE, CHANNELS, SAMPLE_RATE, BIT_DEPTH, "path/to/sample.wav"); 21 | 22 | SECTION("test basename") 23 | { 24 | REQUIRE(wave.getPath() == "path/to/sample.wav"); 25 | REQUIRE(wave.getBasename() == "sample"); 26 | REQUIRE(wave.getBasename(true) == "sample.wav"); 27 | } 28 | 29 | SECTION("test path") 30 | { 31 | wave.setPath("path/is/now/different.mp3"); 32 | 33 | REQUIRE(wave.getPath() == "path/is/now/different.mp3"); 34 | 35 | wave.setPath("path/is/now/different.mp3", 5); 36 | 37 | REQUIRE(wave.getPath() == "path/is/now/different-5.mp3"); 38 | } 39 | 40 | SECTION("test change name") 41 | { 42 | REQUIRE(wave.getPath() == "path/to/sample.wav"); 43 | REQUIRE(wave.getBasename() == "sample"); 44 | REQUIRE(wave.getBasename(true) == "sample.wav"); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/channelFactory.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "../src/core/channels/channelFactory.h" 3 | #include "../src/core/types.h" 4 | #include 5 | 6 | using std::string; 7 | using namespace giada; 8 | using namespace giada::m; 9 | 10 | TEST_CASE("channelFactory") 11 | { 12 | SECTION("test creation") 13 | { 14 | channelFactory::Data data = channelFactory::create( 15 | /*id=*/{}, 16 | ChannelType::SAMPLE, 17 | /*bufferSize=*/1024, 18 | Resampler::Quality::LINEAR, 19 | /*overdubProtection=*/false); 20 | 21 | REQUIRE(data.channel.id.isValid()); // Id must be auto-generated if passed {} (invalid) in channelFactory::create 22 | REQUIRE(data.channel.type == ChannelType::SAMPLE); 23 | 24 | SECTION("test clone") 25 | { 26 | channelFactory::Data clone = channelFactory::create(data.channel, /*bufferSize=*/1024, Resampler::Quality::LINEAR); 27 | 28 | REQUIRE(clone.channel.id != data.channel.id); // Clone must have new ID 29 | REQUIRE(clone.channel.type == data.channel.type); 30 | REQUIRE(clone.channel.volume == data.channel.volume); 31 | REQUIRE(clone.channel.pan == data.channel.pan); 32 | REQUIRE(clone.channel.armed == data.channel.armed); 33 | REQUIRE(clone.channel.key == data.channel.key); 34 | REQUIRE(clone.channel.getName(Scene{0}) == data.channel.getName(Scene{0})); 35 | REQUIRE(clone.channel.height == data.channel.height); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/gui/types.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_V_TYPES_H 28 | #define G_V_TYPES_H 29 | 30 | namespace giada::v 31 | { 32 | using Pixel = int; 33 | 34 | enum class Direction 35 | { 36 | HORIZONTAL, 37 | VERTICAL 38 | }; 39 | } // namespace giada::v 40 | 41 | #endif -------------------------------------------------------------------------------- /src/gui/dialogs/about.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_ABOUT_H 28 | #define GD_ABOUT_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | 32 | namespace giada::v 33 | { 34 | class gdAbout : public gdWindow 35 | { 36 | public: 37 | gdAbout(); 38 | }; 39 | } // namespace giada::v 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/gui/dialogs/warnings.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_WARNINGS_H 28 | #define GD_WARNINGS_H 29 | 30 | namespace giada::v 31 | { 32 | void gdAlert(const char* c, bool resizable = false); 33 | int gdConfirmWin(const char* title, const char* msg); 34 | } // namespace giada::v 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/core/model/loadState.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/model/loadState.h" 28 | 29 | namespace giada::m::model 30 | { 31 | bool LoadState::isGood() const 32 | { 33 | return patch.status == G_FILE_OK && missingWaves.empty() && missingPlugins.empty(); 34 | } 35 | } // namespace giada::m::model 36 | -------------------------------------------------------------------------------- /src/utils/ver.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_UTILS_VER_H 28 | #define G_UTILS_VER_H 29 | 30 | #include 31 | 32 | namespace giada::u::ver 33 | { 34 | std::string getLibsndfileVersion(); 35 | std::string getRtAudioVersion(); 36 | std::string getRtMidiVersion(); 37 | } // namespace giada::u::ver 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/gui/elems/basics/browser.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_BROWSER_H 28 | #define GE_BROWSER_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geBrowser : public Fl_Browser 35 | { 36 | public: 37 | geBrowser(int x, int y, int w, int h); 38 | geBrowser(); 39 | }; 40 | } // namespace giada::v 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/legend.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_LEGEND_H 28 | #define GE_LEGEND_H 29 | 30 | #include "src/gui/elems/basics/box.h" 31 | 32 | namespace giada::v 33 | { 34 | class geLegend : public geBox 35 | { 36 | public: 37 | geLegend(const char* label); 38 | 39 | void draw() override; 40 | }; 41 | } // namespace giada::v 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gui/elems/basics/slider.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SLIDER_H 28 | #define GE_SLIDER_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geSlider : public Fl_Slider 35 | { 36 | public: 37 | geSlider(int x, int y, int w, int h, const char* l = nullptr); 38 | 39 | int id; 40 | }; 41 | } // namespace giada::v 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/aliases.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_ALIASES_H 28 | #define G_ALIASES_H 29 | 30 | #include "src/deps/geompp/src/range.hpp" 31 | #include "src/deps/mcl-utils/src/id.hpp" 32 | 33 | namespace giada 34 | { 35 | using ID = mcl::utils::Id; 36 | using Frame = int; 37 | using SampleRange = geompp::Range; 38 | } // namespace giada 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gui/elems/basics/tabs.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TABS_H 28 | #define GE_TABS_H 29 | 30 | #include "src/deps/geompp/src/rect.hpp" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geTabs : public Fl_Tabs 36 | { 37 | public: 38 | geTabs(geompp::Rect); 39 | 40 | void add(Fl_Widget*); 41 | }; 42 | } // namespace giada::v 43 | 44 | #endif -------------------------------------------------------------------------------- /src/gui/elems/basics/progress.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PROGRESS_H 28 | #define GE_PROGRESS_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geProgress : public Fl_Progress 35 | { 36 | public: 37 | geProgress(int x, int y, int w, int h, const char* l = nullptr); 38 | geProgress(); 39 | }; 40 | } // namespace giada::v 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainMenu.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_MENU_H 28 | #define GE_MAIN_MENU_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geMainMenu : public Fl_Sys_Menu_Bar 35 | { 36 | public: 37 | geMainMenu(); 38 | 39 | private: 40 | void cb_file(); 41 | void cb_edit(); 42 | }; 43 | } // namespace giada::v 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/core/init.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_INIT_H 28 | #define G_INIT_H 29 | 30 | namespace giada::m::init 31 | { 32 | /* tests 33 | Performs tests, if requested. Returns -1 if no tests are available or the 34 | `--run-tests` has not been passed in. */ 35 | 36 | int tests(int argc, char** argv); 37 | 38 | void startup(); 39 | void run(); 40 | void shutdown(); 41 | } // namespace giada::m::init 42 | 43 | #endif -------------------------------------------------------------------------------- /src/core/model/behaviors.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_BEHAVIORS_H 28 | #define G_MODEL_BEHAVIORS_H 29 | 30 | namespace giada::m::model 31 | { 32 | struct Behaviors 33 | { 34 | bool chansStopOnSeqHalt = false; 35 | bool treatRecsAsLoops = false; 36 | bool inputMonitorDefaultOn = false; 37 | bool overdubProtectionDefaultOn = false; 38 | }; 39 | } // namespace giada::m::model 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/core/pan.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_PAN_H 28 | #define G_PAN_H 29 | 30 | #include 31 | 32 | namespace giada 33 | { 34 | class Pan 35 | { 36 | public: 37 | using Type = std::array; 38 | 39 | Pan(float v); 40 | 41 | bool operator==(const Pan&) const; 42 | 43 | Type get() const; 44 | float asFloat() const; 45 | 46 | private: 47 | Type m_data; 48 | }; 49 | } // namespace giada 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/glue/storage.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_GLUE_STORAGE_H 28 | #define G_GLUE_STORAGE_H 29 | 30 | /* giada::c::storage 31 | Persistence functions. Only the main thread can use these! */ 32 | 33 | namespace giada::c::storage 34 | { 35 | void loadProject(void* data); 36 | void saveProject(void* data); 37 | void saveSample(void* data); 38 | void loadSample(void* data); 39 | } // namespace giada::c::storage 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/gui/dialogs/missingAssets.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MISSING_ASSETS_H 28 | #define GD_MISSING_ASSETS_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | 32 | namespace giada::m::model 33 | { 34 | struct LoadState; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class gdMissingAssets : public gdWindow 40 | { 41 | public: 42 | gdMissingAssets(const m::model::LoadState&); 43 | }; 44 | } // namespace giada::v 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/core/confFactory.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_CONF_FACTORY_H 28 | #define G_CONF_FACTORY_H 29 | 30 | #include "src/core/conf.h" 31 | 32 | namespace giada::m::confFactory 33 | { 34 | /* serialize 35 | Writes Conf to disk. */ 36 | 37 | bool serialize(const Conf&); 38 | 39 | /* deserialize 40 | Reads data from disk into a new Conf object. */ 41 | 42 | Conf deserialize(); 43 | } // namespace giada::m::confFactory 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/gui/dialogs/bpmInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BPMINPUT_H 28 | #define GD_BPMINPUT_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | 32 | namespace giada::v 33 | { 34 | class geTextButton; 35 | class geInput; 36 | class gdBpmInput : public gdWindow 37 | { 38 | public: 39 | gdBpmInput(float value); 40 | 41 | private: 42 | geInput* m_value; 43 | geTextButton* m_ok; 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/core/model/sharedLock.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_SHAREDLOCK_H 28 | #define G_MODEL_SHAREDLOCK_H 29 | 30 | #include "src/core/model/types.h" 31 | 32 | namespace giada::m::model 33 | { 34 | class Model; 35 | class SharedLock 36 | { 37 | public: 38 | SharedLock(Model&, SwapType t); 39 | ~SharedLock(); 40 | 41 | private: 42 | Model& m_model; 43 | SwapType m_swapType; 44 | }; 45 | } // namespace giada::m::model 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiOutputSampleCh.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MIDI_OUTPUT_SAMPLE_CH_H 28 | #define GD_MIDI_OUTPUT_SAMPLE_CH_H 29 | 30 | #include "src/gui/dialogs/midiIO/midiOutputBase.h" 31 | 32 | namespace giada::v 33 | { 34 | class gdMidiOutputSampleCh : public gdMidiOutputBase 35 | { 36 | public: 37 | gdMidiOutputSampleCh(ID channelId); 38 | 39 | void rebuild() override; 40 | }; 41 | } // namespace giada::v 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserDir.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BROWSER_DIR_H 28 | #define GD_BROWSER_DIR_H 29 | 30 | #include "src/gui/dialogs/browser/browserBase.h" 31 | 32 | namespace giada::v 33 | { 34 | class gdBrowserDir : public gdBrowserBase 35 | { 36 | public: 37 | gdBrowserDir(const std::string& title, const std::string& path, 38 | std::function cb, const Model&); 39 | }; 40 | } // namespace giada::v 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/utils/string.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * utils 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef G_UTILS_STRING_H 30 | #define G_UTILS_STRING_H 31 | 32 | #include "src/core/types.h" 33 | #include "src/deps/rtaudio/RtAudio.h" 34 | 35 | namespace giada::u::string 36 | { 37 | std::string toString(Thread); 38 | std::string toString(RtAudio::Api); 39 | std::string toString(SamplePlayerMode); 40 | std::string toString(ChannelType); 41 | } // namespace giada::u::string 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/utils/cocoa.mm: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * cocoa 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | 30 | #import 31 | #import 32 | #import "cocoa.h" 33 | 34 | 35 | void* cocoa_getViewFromWindow(void* p) 36 | { 37 | NSWindow* win = (NSWindow* ) p; 38 | return (void*) win.contentView; 39 | } 40 | 41 | /* 42 | void cocoa_setWindowSize(void *p, int w, int h) 43 | { 44 | NSWindow *win = (NSWindow *) p; 45 | [win setContentSize:NSMakeSize(w, h)]; 46 | } 47 | */ -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserLoad.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BROWSER_LOAD_H 28 | #define GD_BROWSER_LOAD_H 29 | 30 | #include "src/gui/dialogs/browser/browserBase.h" 31 | 32 | namespace giada::v 33 | { 34 | class gdBrowserLoad : public gdBrowserBase 35 | { 36 | public: 37 | gdBrowserLoad(const std::string& title, const std::string& path, 38 | std::function cb, ID channelId, const Model&); 39 | }; 40 | } // namespace giada::v 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/groupChannelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_GROUP_CHANNEL_BUTTON_H 28 | #define GE_GROUP_CHANNEL_BUTTON_H 29 | 30 | #include "src/gui/elems/mainWindow/keyboard/channelButton.h" 31 | 32 | namespace giada::v 33 | { 34 | class geGroupChannelButton : public geChannelButton 35 | { 36 | public: 37 | geGroupChannelButton(const c::channel::Data& d); 38 | 39 | void refresh() override; 40 | }; 41 | } // namespace giada::v 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/utils/vector.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_UTILS_VECTOR_H 28 | #define G_UTILS_VECTOR_H 29 | 30 | #include "src/deps/mcl-utils/src/container.hpp" 31 | 32 | namespace utils = mcl::utils; 33 | 34 | namespace giada::u::container 35 | { 36 | template 37 | auto findIf(T& v, ID id) 38 | { 39 | return utils::container::findIf(v, [id](const typename T::value_type& t) 40 | { return t.id == id; }); 41 | } 42 | } // namespace giada::u::container 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/gui/elems/basics/scrollbar.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * geScroll 6 | * Custom scroll with nice scrollbars and something else. 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #ifndef GE_SCROLLBAR_H 31 | #define GE_SCROLLBAR_H 32 | 33 | #include 34 | #include 35 | 36 | namespace giada::v 37 | { 38 | class geScrollbar : public Fl_Scrollbar 39 | { 40 | public: 41 | geScrollbar(); 42 | 43 | std::function onScroll; 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/gui/dialogs/beatsInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BEATSINPUT_H 28 | #define GD_BEATSINPUT_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | 32 | namespace giada::v 33 | { 34 | class geTextButton; 35 | class geInput; 36 | class gdBeatsInput : public gdWindow 37 | { 38 | public: 39 | gdBeatsInput(int beats, int bars); 40 | 41 | private: 42 | geInput* m_beats; 43 | geInput* m_bars; 44 | geTextButton* m_ok; 45 | }; 46 | } // namespace giada::v 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/core/channels/midiChannel.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/channels/midiChannel.h" 28 | 29 | namespace giada::m 30 | { 31 | MidiChannel::MidiChannel() 32 | : outputEnabled(false) 33 | , outputFilter(0) 34 | { 35 | } 36 | 37 | /* -------------------------------------------------------------------------- */ 38 | 39 | MidiChannel::MidiChannel(const Patch::Channel& p) 40 | : outputEnabled(p.midiOut) 41 | , outputFilter(p.midiOutChan) 42 | { 43 | } 44 | } // namespace giada::m 45 | -------------------------------------------------------------------------------- /src/core/model/sharedLock.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/model/sharedLock.h" 28 | #include "src/core/model/model.h" 29 | 30 | namespace giada::m::model 31 | { 32 | SharedLock::SharedLock(Model& m, SwapType t) 33 | : m_model(m) 34 | , m_swapType(t) 35 | { 36 | m_model.get().locked = true; 37 | m_model.swap(SwapType::NONE); 38 | } 39 | 40 | SharedLock::~SharedLock() 41 | { 42 | m_model.get().locked = false; 43 | m_model.swap(m_swapType); 44 | } 45 | } // namespace giada::m::model 46 | -------------------------------------------------------------------------------- /src/utils/time.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * utils 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef G_UTILS_TIME_H 30 | #define G_UTILS_TIME_H 31 | 32 | #include "src/types.h" 33 | 34 | namespace giada::u::time 35 | { 36 | /* beatToFrame 37 | Returns the frame a beat corresponds to. */ 38 | 39 | Frame beatToFrame(int beat, int sampleRate, float bpm); 40 | 41 | /* frameToBeat 42 | Returns the beat a frame corresponds to. */ 43 | 44 | int frameToBeat(Frame frame, int sampleRate, float bpm); 45 | } // namespace giada::u::time 46 | 47 | #endif -------------------------------------------------------------------------------- /src/core/rendering/midiAdvance.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_RENDERING_MIDI_ADVANCE_H 28 | #define G_RENDERING_MIDI_ADVANCE_H 29 | 30 | #include "src/core/channels/channelShared.h" 31 | #include "src/core/sequencer.h" 32 | 33 | namespace giada::m 34 | { 35 | class Channel; 36 | class KernelMidi; 37 | } // namespace giada::m 38 | 39 | namespace giada::m::rendering 40 | { 41 | void advanceMidiChannel(const Channel&, const Sequencer::Event&, KernelMidi&); 42 | } // namespace giada::m::rendering 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/core/rendering/sampleAdvance.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_RENDERING_SAMPLE_ADVANCE_H 28 | #define G_RENDERING_SAMPLE_ADVANCE_H 29 | 30 | #include "src/core/sequencer.h" 31 | #include "src/core/types.h" 32 | 33 | namespace giada::m 34 | { 35 | struct Action; 36 | struct ChannelShared; 37 | class Channel; 38 | } // namespace giada::m 39 | 40 | namespace giada::m::rendering 41 | { 42 | void advanceSampleChannel(const Channel&, const Sequencer::Event&); 43 | } // namespace giada::m::rendering 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/envelopePoint.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_ENVELOPE_POINT_H 28 | #define GE_ENVELOPE_POINT_H 29 | 30 | #include "src/core/actions/action.h" 31 | #include "src/gui/elems/actionEditor/baseAction.h" 32 | 33 | namespace giada::v 34 | { 35 | class geEnvelopePoint : public geBaseAction 36 | { 37 | public: 38 | static const Pixel SIDE = 12; 39 | 40 | geEnvelopePoint(Pixel x, Pixel y, m::Action a); 41 | 42 | void draw() override; 43 | }; 44 | } // namespace giada::v 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/midiChannelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MIDI_CHANNEL_BUTTON_H 28 | #define GE_MIDI_CHANNEL_BUTTON_H 29 | 30 | #include "src/gui/elems/mainWindow/keyboard/channelButton.h" 31 | 32 | namespace giada::v 33 | { 34 | class geMidiChannelButton : public geChannelButton 35 | { 36 | public: 37 | geMidiChannelButton(const c::channel::Data& d); 38 | 39 | void refresh() override; 40 | 41 | private: 42 | void refreshLabel(); 43 | }; 44 | } // namespace giada::v 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/core/channels/midiLightning.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/channels/midiLightning.h" 28 | 29 | namespace giada::m 30 | { 31 | MidiLightning::MidiLightning() 32 | : enabled(false) 33 | { 34 | } 35 | 36 | /* -------------------------------------------------------------------------- */ 37 | 38 | MidiLightning::MidiLightning(const Patch::Channel& p) 39 | : enabled(p.midiOutL) 40 | , playing(p.midiOutLplaying) 41 | , mute(p.midiOutLmute) 42 | , solo(p.midiOutLsolo) 43 | { 44 | } 45 | }; // namespace giada::m 46 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/groupChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2023 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_GROUP_CHANNEL_H 28 | #define GE_GROUP_CHANNEL_H 29 | 30 | #include "src/glue/channel.h" 31 | #include "src/gui/elems/mainWindow/keyboard/channel.h" 32 | 33 | namespace giada::v 34 | { 35 | class geGroupChannel : public geChannel 36 | { 37 | public: 38 | geGroupChannel(c::channel::Data d); 39 | 40 | void resize(int x, int y, int w, int h) override; 41 | 42 | private: 43 | void openMenu(); 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/core/model/kernelMidi.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_KERNEL_MIDI_H 28 | #define G_MODEL_KERNEL_MIDI_H 29 | 30 | #include "src/core/const.h" 31 | #include 32 | 33 | namespace giada::m::model 34 | { 35 | struct KernelMidi 36 | { 37 | RtMidi::Api api = G_DEFAULT_MIDI_API; 38 | std::set devicesOut; 39 | std::set devicesIn; 40 | std::string midiMapPath = ""; 41 | int sync = G_MIDI_SYNC_NONE; 42 | }; 43 | } // namespace giada::m::model 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/gui/elems/basics/dial.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_DIAL_H 28 | #define GE_DIAL_H 29 | 30 | #include 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geDial : public Fl_Dial 36 | { 37 | public: 38 | geDial(int x, int y, int w, int h, const char* l = nullptr); 39 | geDial(const char* l = nullptr); 40 | 41 | void draw() override; 42 | 43 | std::function onChange; 44 | 45 | private: 46 | static void cb_change(Fl_Widget*, void*); 47 | }; 48 | } // namespace giada::v 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/sampleChannelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SAMPLE_CHANNEL_BUTTON_H 28 | #define GE_SAMPLE_CHANNEL_BUTTON_H 29 | 30 | #include "src/gui/elems/mainWindow/keyboard/channelButton.h" 31 | 32 | namespace giada 33 | { 34 | namespace v 35 | { 36 | class geSampleChannelButton : public geChannelButton 37 | { 38 | public: 39 | geSampleChannelButton(const c::channel::Data& d); 40 | 41 | int handle(int e) override; 42 | 43 | void refresh() override; 44 | }; 45 | } // namespace v 46 | } // namespace giada 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserSave.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BROWSER_SAVE_H 28 | #define GD_BROWSER_SAVE_H 29 | 30 | #include "src/gui/dialogs/browser/browserBase.h" 31 | 32 | namespace giada::v 33 | { 34 | class geInput; 35 | class gdBrowserSave : public gdBrowserBase 36 | { 37 | public: 38 | gdBrowserSave(const std::string& title, const std::string& path, 39 | const std::string& name, std::function cb, 40 | ID channelId, const Model&); 41 | 42 | std::string getName() const; 43 | }; 44 | } // namespace giada::v 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/core/channels/midiChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MIDI_CHANNEL_H 28 | #define G_MIDI_CHANNEL_H 29 | 30 | #include "src/core/patch.h" 31 | 32 | namespace giada::m 33 | { 34 | class MidiChannel final 35 | { 36 | public: 37 | MidiChannel(); 38 | MidiChannel(const Patch::Channel&); 39 | 40 | /* outputEnabled 41 | Tells whether MIDI output is enabled or not. */ 42 | 43 | bool outputEnabled; 44 | 45 | /* outputFilter 46 | Which MIDI channel data should be sent to. */ 47 | 48 | int outputFilter; 49 | }; 50 | } // namespace giada::m 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/core/worker.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_WORKER_H 28 | #define G_WORKER_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | namespace giada 35 | { 36 | class Worker 37 | { 38 | public: 39 | Worker(int sleep); 40 | ~Worker(); 41 | 42 | void start(std::function) const; 43 | void stop() const; 44 | void setSleep(int sleep); 45 | 46 | private: 47 | mutable std::thread m_thread; 48 | mutable std::atomic m_running; 49 | int m_sleep; 50 | }; 51 | } // namespace giada 52 | 53 | #endif -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiOutputMidiCh.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * midiOutputMidiCh 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GD_MIDI_OUTPUT_MIDI_CH_H 30 | #define GD_MIDI_OUTPUT_MIDI_CH_H 31 | 32 | #include "src/gui/dialogs/midiIO/midiOutputBase.h" 33 | 34 | namespace giada::v 35 | { 36 | class geChoice; 37 | class gdMidiOutputMidiCh : public gdMidiOutputBase 38 | { 39 | public: 40 | gdMidiOutputMidiCh(ID channelId); 41 | 42 | void rebuild() override; 43 | 44 | private: 45 | geCheck* m_enableOut; 46 | geChoice* m_chanListOut; 47 | }; 48 | } // namespace giada::v 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/utils/cocoa.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * cocoa 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef G_UTILS_COCOA_H 30 | #define G_UTILS_COCOA_H 31 | 32 | /* fl_xid() from FLTK returns a pointer to NSWindow, but plugins on OS X want a 33 | pointer to NSView. The function does the hard conversion. */ 34 | 35 | void* cocoa_getViewFromWindow(void* p); 36 | 37 | /* A bug on on OS X seems to misalign plugins' UI. The function takes care of 38 | fixing the positioning. 39 | TODO temporarily disabled: it does not work. */ 40 | 41 | // void cocoa_setWindowSize(void *p, int w, int h); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/sampleAction.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SAMPLE_ACTION_H 28 | #define GE_SAMPLE_ACTION_H 29 | 30 | #include "src/core/actions/action.h" 31 | #include "src/gui/elems/actionEditor/baseAction.h" 32 | 33 | namespace giada::v 34 | { 35 | class geSampleAction : public geBaseAction 36 | { 37 | public: 38 | geSampleAction(Pixel x, Pixel y, Pixel w, Pixel h, bool singlePress, 39 | m::Action a1, m::Action a2); 40 | 41 | void draw() override; 42 | 43 | private: 44 | bool m_singlePress; 45 | }; 46 | } // namespace giada::v 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/channelProgress.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ge_status 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GE_CHANNEL_PROGRESS_H 30 | #define GE_CHANNEL_PROGRESS_H 31 | 32 | #include 33 | 34 | namespace giada::c::channel 35 | { 36 | struct Data; 37 | } 38 | namespace giada::v 39 | { 40 | class geChannelProgress : public Fl_Box 41 | { 42 | public: 43 | geChannelProgress(int x, int y, int w, int h, c::channel::Data& d); 44 | 45 | void draw() override; 46 | 47 | private: 48 | c::channel::Data& m_channel; 49 | }; 50 | } // namespace giada::v 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/scenes.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SCENES_H 28 | #define GE_SCENES_H 29 | 30 | #include "src/const.h" 31 | #include "src/gui/elems/basics/flex.h" 32 | #include "src/scene.h" 33 | #include "src/types.h" 34 | #include 35 | 36 | namespace giada::v 37 | { 38 | class gePlayButton; 39 | class geScenes : public geFlex 40 | { 41 | public: 42 | geScenes(); 43 | 44 | void refresh(); 45 | 46 | private: 47 | gePlayButton* makeButton(Scene); 48 | 49 | SceneArray m_buttons; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/midiChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MIDI_CHANNEL_H 28 | #define GE_MIDI_CHANNEL_H 29 | 30 | #include "src/gui/elems/mainWindow/keyboard/channel.h" 31 | #include "src/gui/elems/mainWindow/keyboard/channelButton.h" 32 | 33 | namespace giada::v 34 | { 35 | class geMidiChannel : public geChannel 36 | { 37 | public: 38 | geMidiChannel(int x, int y, int w, int h, c::channel::Data d); 39 | 40 | void resize(int x, int y, int w, int h) override; 41 | 42 | private: 43 | void openMenu(); 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/gui/elems/basics/slider.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/elems/basics/slider.h" 28 | #include "src/gui/const.h" 29 | #include "src/gui/elems/basics/boxtypes.h" 30 | 31 | namespace giada::v 32 | { 33 | geSlider::geSlider(int x, int y, int w, int h, const char* l) 34 | : Fl_Slider(x, y, w, h, l) 35 | { 36 | type(FL_HOR_FILL_SLIDER); 37 | 38 | labelsize(G_GUI_FONT_SIZE_BASE); 39 | align(FL_ALIGN_LEFT); 40 | labelcolor(G_COLOR_LIGHT_2); 41 | 42 | box(G_CUSTOM_BORDER_BOX); 43 | color(G_COLOR_GREY_2); 44 | selection_color(G_COLOR_GREY_4); 45 | } 46 | } // namespace giada::v -------------------------------------------------------------------------------- /src/utils/time.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * utils 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #include "src/utils/time.h" 30 | #include 31 | #include 32 | 33 | namespace giada::u::time 34 | { 35 | Frame beatToFrame(int beat, int sampleRate, float bpm) 36 | { 37 | return static_cast((sampleRate * (60.0f / bpm)) * beat); 38 | } 39 | 40 | /* -------------------------------------------------------------------------- */ 41 | 42 | int frameToBeat(Frame frame, int sampleRate, float bpm) 43 | { 44 | return static_cast(frame / (sampleRate * (60.0f / bpm))); 45 | } 46 | } // namespace giada::u::time 47 | -------------------------------------------------------------------------------- /src/gui/elems/basics/progress.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/elems/basics/progress.h" 28 | #include "src/gui/const.h" 29 | #include "src/gui/elems/basics/boxtypes.h" 30 | 31 | namespace giada::v 32 | { 33 | geProgress::geProgress(int x, int y, int w, int h, const char* l) 34 | : Fl_Progress(x, y, w, h, l) 35 | { 36 | color(G_COLOR_GREY_2, G_COLOR_GREY_4); 37 | box(G_CUSTOM_BORDER_BOX); 38 | } 39 | 40 | /* -------------------------------------------------------------------------- */ 41 | 42 | geProgress::geProgress() 43 | : geProgress(0, 0, 0, 0) 44 | { 45 | } 46 | } // namespace giada::v -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/engine.h" 28 | #include "src/gui/ui.h" 29 | 30 | giada::m::Engine* g_engine = nullptr; 31 | giada::v::Ui* g_ui = nullptr; 32 | 33 | int main(int argc, char** argv) 34 | { 35 | using namespace giada; 36 | 37 | if (int ret = m::init::tests(argc, argv); ret != -1) 38 | return ret; 39 | 40 | auto enginePtr = std::make_unique(); 41 | auto uiPtr = std::make_unique(); 42 | 43 | g_engine = enginePtr.get(); 44 | g_ui = uiPtr.get(); 45 | 46 | m::init::startup(); 47 | m::init::run(); 48 | 49 | return 0; 50 | } -------------------------------------------------------------------------------- /src/core/model/loadState.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_LOADSTATE_H 28 | #define G_MODEL_LOADSTATE_H 29 | 30 | #include "src/core/patch.h" 31 | #include 32 | 33 | namespace giada::m::model 34 | { 35 | /* LoadState 36 | Contains information about the model state after a patch has been loaded. */ 37 | 38 | struct LoadState 39 | { 40 | bool isGood() const; 41 | 42 | Patch patch; 43 | std::vector missingWaves = {}; 44 | std::unordered_set missingPlugins = {}; 45 | }; 46 | } // namespace giada::m::model 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/core/patchFactory.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_PATCH_FACTORY_H 28 | #define G_PATCH_FACTORY_H 29 | 30 | #include "src/core/patch.h" 31 | 32 | namespace giada::m::patchFactory 33 | { 34 | /* serialize 35 | Writes Patch to disk. The 'filePath' parameter refers to the .gptc file. */ 36 | 37 | bool serialize(const Patch&, const std::string& filePath); 38 | 39 | /* deserialize 40 | Reads data from disk into a new Patch object. The 'filePath' parameter refers to 41 | the .gptc file. */ 42 | 43 | Patch deserialize(const std::string& filePath); 44 | } // namespace giada::m::patchFactory 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/gui/elems/panTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PAN_TOOL_H 28 | #define GE_PAN_TOOL_H 29 | 30 | #include "src/gui/elems/basics/flex.h" 31 | #include "src/types.h" 32 | 33 | namespace giada::v 34 | { 35 | class geInput; 36 | class geDial; 37 | class geTextButton; 38 | class gePanTool : public geFlex 39 | { 40 | public: 41 | gePanTool(ID channelId, float pan, int labelWidth = 0); 42 | 43 | private: 44 | void update(float pan); 45 | 46 | ID m_channelId; 47 | 48 | geInput* m_input; 49 | geDial* m_dial; 50 | geTextButton* m_reset; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/elems/config/stringMenu.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_STRING_MENU_H 28 | #define GE_STRING_MENU_H 29 | 30 | #include "src/gui/elems/basics/choice.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geStringMenu : public geChoice 37 | { 38 | public: 39 | geStringMenu(const char* l, const std::string& msgIfNotFound, int labelWidth); 40 | geStringMenu(const std::string& msgIfNotFound); 41 | 42 | void rebuild(const std::vector& data); 43 | 44 | private: 45 | std::string m_msgIfNotFound; 46 | }; 47 | } // namespace giada::v 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/core/midiLearnParam.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MIDI_LEARN_PARAM_H 28 | #define G_MIDI_LEARN_PARAM_H 29 | 30 | #include "src/core/weakAtomic.h" 31 | #include 32 | #include 33 | 34 | namespace giada::m 35 | { 36 | class MidiLearnParam 37 | { 38 | public: 39 | MidiLearnParam(); 40 | MidiLearnParam(uint32_t v, std::size_t index = 0); 41 | 42 | uint32_t getValue() const; 43 | std::size_t getIndex() const; 44 | void setValue(uint32_t v); 45 | 46 | private: 47 | WeakAtomic m_param; 48 | std::size_t m_index; 49 | }; 50 | } // namespace giada::m 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/core/plugins/pluginState.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_PLUGIN_STATE_H 28 | #define G_PLUGIN_STATE_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | namespace giada::m 35 | { 36 | class PluginState 37 | { 38 | public: 39 | PluginState() = default; // Invalid state 40 | PluginState(juce::MemoryBlock&& data); 41 | PluginState(const std::string& base64); 42 | 43 | std::string asBase64() const; 44 | const void* getData() const; 45 | size_t getSize() const; 46 | 47 | private: 48 | juce::MemoryBlock m_data; 49 | }; 50 | } // namespace giada::m 51 | 52 | #endif -------------------------------------------------------------------------------- /src/gui/elems/basics/box.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_BOX_H 28 | #define GE_BOX_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geBox : public Fl_Box 37 | { 38 | public: 39 | geBox(int x, int y, int w, int h, const char* l = nullptr, Fl_Align al = FL_ALIGN_CENTER); 40 | geBox(const char* l = nullptr, Fl_Align al = FL_ALIGN_CENTER); 41 | 42 | void draw() override; 43 | 44 | void setSvgImage(const char*); 45 | 46 | private: 47 | std::unique_ptr m_image; 48 | }; 49 | } // namespace giada::v 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/envelopePoint.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/elems/actionEditor/envelopePoint.h" 28 | #include "src/gui/const.h" 29 | #include 30 | 31 | namespace giada::v 32 | { 33 | geEnvelopePoint::geEnvelopePoint(Pixel X, Pixel Y, m::Action a) 34 | : geBaseAction(X, Y, SIDE, SIDE, /*resizable=*/false, a, {}) 35 | { 36 | } 37 | 38 | /* -------------------------------------------------------------------------- */ 39 | 40 | void geEnvelopePoint::draw() 41 | { 42 | fl_color(hovered ? G_COLOR_LIGHT_2 : G_COLOR_LIGHT_1); 43 | fl_pie(x(), y(), w(), h(), 0, 360); 44 | } 45 | } // namespace giada::v -------------------------------------------------------------------------------- /src/gui/elems/basics/boxtypes.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * boxtypes 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GE_BOXTYPES_H 30 | #define GE_BOXTYPES_H 31 | 32 | #include 33 | 34 | constexpr Fl_Boxtype G_CUSTOM_BORDER_BOX = FL_FREE_BOXTYPE; 35 | constexpr Fl_Boxtype G_CUSTOM_UP_BOX = static_cast(FL_FREE_BOXTYPE + 1); 36 | constexpr Fl_Boxtype G_CUSTOM_DOWN_BOX = static_cast(FL_FREE_BOXTYPE + 3); 37 | 38 | void g_customBorderBox(int x, int y, int w, int h, Fl_Color c); 39 | void g_customUpBox(int x, int y, int w, int h, Fl_Color c); 40 | void g_customDownBox(int x, int y, int w, int h, Fl_Color c); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/utils/fs.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * utils 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef G_UTILS_FS_H 30 | #define G_UTILS_FS_H 31 | 32 | #include 33 | 34 | namespace giada::u::fs 35 | { 36 | bool isProject(const std::string& s); 37 | std::string getConfigDirPath(); 38 | std::string getMidiMapsPath(); 39 | std::string getLangMapsPath(); 40 | 41 | /* createConfigFolder 42 | Creates the configuration folder that holds the .conf file. */ 43 | 44 | bool createConfigFolder(); 45 | 46 | /* getConfigFilePath 47 | Returns the path to the .conf file. */ 48 | 49 | std::string getConfigFilePath(); 50 | } // namespace giada::u::fs 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gui/dialogs/actionEditor/midiActionEditor.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MIDI_ACTION_EDITOR_H 28 | #define GD_MIDI_ACTION_EDITOR_H 29 | 30 | #include "src/gui/dialogs/actionEditor/baseActionEditor.h" 31 | 32 | namespace giada::v 33 | { 34 | class gePianoRoll; 35 | class geVelocityEditor; 36 | class gdMidiActionEditor : public gdBaseActionEditor 37 | { 38 | public: 39 | gdMidiActionEditor(ID channelId, const Model&); 40 | ~gdMidiActionEditor(); 41 | 42 | void rebuild() override; 43 | 44 | private: 45 | gePianoRoll* m_pianoRoll; 46 | geVelocityEditor* m_velocityEditor; 47 | }; 48 | } // namespace giada::v 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/gui/dialogs/channelNameInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_CHANNEL_NAME_INPUT_H 28 | #define GD_CHANNEL_NAME_INPUT_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | 32 | namespace giada::c::channel 33 | { 34 | struct Data; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class geTextButton; 40 | class geInput; 41 | class gdChannelNameInput : public gdWindow 42 | { 43 | public: 44 | gdChannelNameInput(const c::channel::Data& d); 45 | 46 | private: 47 | const c::channel::Data& m_data; 48 | 49 | geInput* m_name; 50 | geTextButton* m_ok; 51 | geTextButton* m_cancel; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/pianoItem.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PIANO_ITEM_H 28 | #define GE_PIANO_ITEM_H 29 | 30 | #include "src/gui/elems/actionEditor/baseAction.h" 31 | 32 | namespace giada::m 33 | { 34 | struct Action; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class gePianoItem : public geBaseAction 40 | { 41 | public: 42 | gePianoItem(int x, int y, int w, int h, m::Action a1, m::Action a2); 43 | 44 | void draw() override; 45 | 46 | bool isResizable() const; 47 | 48 | private: 49 | bool m_ringLoop; 50 | bool m_orphaned; 51 | 52 | Pixel calcVelocityH() const; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/core/channels/midiLightning.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MIDI_LIGHTNING_H 28 | #define G_MIDI_LIGHTNING_H 29 | 30 | #include "src/core/midiLearnParam.h" 31 | #include "src/core/patch.h" 32 | 33 | namespace giada::m 34 | { 35 | class MidiLightning final 36 | { 37 | public: 38 | MidiLightning(); 39 | MidiLightning(const Patch::Channel&); 40 | 41 | /* enabled 42 | Tells whether MIDI lighting is enabled or not. */ 43 | 44 | bool enabled; 45 | 46 | /* MIDI learning fields for MIDI lighting. */ 47 | 48 | MidiLearnParam playing; 49 | MidiLearnParam mute; 50 | MidiLearnParam solo; 51 | }; 52 | } // namespace giada::m 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/elems/config/tabMisc.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TAB_MISC_H 28 | #define GE_TAB_MISC_H 29 | 30 | #include "src/deps/geompp/src/rect.hpp" 31 | #include "src/glue/config.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geChoice; 37 | class geStringMenu; 38 | class geTabMisc : public Fl_Group 39 | { 40 | public: 41 | geTabMisc(geompp::Rect); 42 | 43 | void save(); 44 | 45 | private: 46 | c::config::MiscData m_data; 47 | 48 | geChoice* m_debugMsg; 49 | geChoice* m_tooltips; 50 | geStringMenu* m_langMap; 51 | geChoice* m_uiScaling; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/elems/volumeTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_VOLUME_TOOL_H 28 | #define GE_VOLUME_TOOL_H 29 | 30 | #include "src/gui/elems/basics/flex.h" 31 | #include "src/types.h" 32 | 33 | namespace giada::v 34 | { 35 | class geDial; 36 | class geInput; 37 | class geTextButton; 38 | class geVolumeTool : public geFlex 39 | { 40 | public: 41 | geVolumeTool(ID channelId, float volume, int labelWidth = 0); 42 | 43 | private: 44 | void update(float volume, bool fromDial = false); 45 | 46 | ID m_channelId; 47 | 48 | geInput* m_input; 49 | geDial* m_dial; 50 | geTextButton* m_reset; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/dialogs/pluginChooser.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_PLUGIN_CHOOSER_H 28 | #define GD_PLUGIN_CHOOSER_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | #include "src/gui/model.h" 32 | 33 | namespace giada::v 34 | { 35 | class geTextButton; 36 | class gePluginBrowser; 37 | class gdPluginChooser : public gdWindow 38 | { 39 | public: 40 | gdPluginChooser(ID channelId, const Model&); 41 | ~gdPluginChooser(); 42 | 43 | private: 44 | PluginSortMode getSortMode() const; 45 | 46 | geTextButton* addBtn; 47 | geTextButton* cancelBtn; 48 | gePluginBrowser* browser; 49 | 50 | ID m_channelId; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif -------------------------------------------------------------------------------- /src/gui/dialogs/progress.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_PROGRESS_H 28 | #define GD_PROGRESS_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geBox; 36 | class geProgress; 37 | class geTextButton; 38 | class gdProgress : public gdWindow 39 | { 40 | public: 41 | gdProgress(); 42 | 43 | void setProgress(float p); 44 | void popup(const char* s, bool cancellable = false); 45 | 46 | std::function onCancel; 47 | 48 | private: 49 | geBox* m_text; 50 | geProgress* m_progress; 51 | geTextButton* m_cancelBtn; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainTransport.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_TRANSPORT_H 28 | #define GE_MAIN_TRANSPORT_H 29 | 30 | #include "src/gui/elems/basics/flex.h" 31 | 32 | namespace giada::v 33 | { 34 | class geImageButton; 35 | class geMainTransport : public geFlex 36 | { 37 | public: 38 | geMainTransport(); 39 | 40 | void refresh(); 41 | 42 | private: 43 | geImageButton* m_rewind; 44 | geImageButton* m_play; 45 | geImageButton* m_recTriggerMode; 46 | geImageButton* m_recAction; 47 | geImageButton* m_recInput; 48 | geImageButton* m_inputRecMode; 49 | geImageButton* m_metronome; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /tests/midiEvent.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/midiEvent.h" 2 | #include "../src/core/const.h" 3 | #include "../src/deps/mcl-utils/src/math.hpp" 4 | #include 5 | 6 | TEST_CASE("MidiEvent") 7 | { 8 | namespace math = mcl::utils::math; 9 | 10 | using namespace giada::m; 11 | 12 | constexpr uint32_t raw = 0x912C5000; // Note on, channel 1, key 44 (0x2C), velocity 80 (0x50) 13 | 14 | SECTION("Test Channel message") 15 | { 16 | MidiEvent e = MidiEvent::makeFromRaw(raw, /*numBytes=*/3, /*timestamp=*/0.0); 17 | 18 | REQUIRE(e.getRaw() == raw); 19 | REQUIRE(e.getRawNoVelocity() == 0x912C0000); 20 | REQUIRE(e.getType() == MidiEvent::Type::CHANNEL); 21 | REQUIRE(e.getNumBytes() == 3); 22 | REQUIRE(e.getStatus() == 0x90); 23 | REQUIRE(e.getChannel() == 1); 24 | REQUIRE(e.getNote() == 44); 25 | REQUIRE(e.getVelocity() == 80); 26 | REQUIRE(e.getByte1() == 0x91); 27 | REQUIRE(e.getByte2() == 0x2C); 28 | REQUIRE(e.getByte3() == 0x50); 29 | } 30 | 31 | SECTION("Test get/set properties") 32 | { 33 | MidiEvent e = MidiEvent::makeFromRaw(raw, /*numBytes=*/3, /*timestamp=*/0.0); 34 | 35 | SECTION("Test velocity") 36 | { 37 | e.setVelocity(33); 38 | REQUIRE(e.getChannel() == 1); 39 | REQUIRE(e.getNote() == 44); 40 | REQUIRE(e.getVelocity() == 33); 41 | REQUIRE(e.getVelocityFloat() == math::map(33, G_MAX_VELOCITY, G_MAX_VELOCITY_FLOAT)); 42 | 43 | e.setVelocityFloat(0.4f); 44 | REQUIRE(e.getVelocity() == math::map(0.4f, G_MAX_VELOCITY_FLOAT, G_MAX_VELOCITY)); 45 | REQUIRE(e.getVelocityFloat() == 0.4f); 46 | } 47 | 48 | SECTION("Test channel") 49 | { 50 | e.setChannel(4); 51 | REQUIRE(e.getChannel() == 4); 52 | REQUIRE(e.getNote() == 44); 53 | REQUIRE(e.getVelocity() == 80); 54 | REQUIRE(e.getVelocityFloat() == math::map(80, G_MAX_VELOCITY, G_MAX_VELOCITY_FLOAT)); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiInputBase.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MIDI_INPUT_BASE_H 28 | #define GD_MIDI_INPUT_BASE_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | #include "src/gui/elems/midiIO/midiLearner.h" 32 | #include "src/gui/model.h" 33 | 34 | namespace giada::v 35 | { 36 | class geCheck; 37 | class geTextButton; 38 | class geChoice; 39 | class gdMidiInputBase : public gdWindow 40 | { 41 | public: 42 | virtual ~gdMidiInputBase(); 43 | 44 | protected: 45 | gdMidiInputBase(const char* title, const Model&); 46 | 47 | geTextButton* m_ok; 48 | geCheck* m_enable; 49 | geChoice* m_channel; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/dialogs/pluginWindow.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_PLUGIN_WINDOW_H 28 | #define GD_PLUGIN_WINDOW_H 29 | 30 | #include "src/glue/plugin.h" 31 | #include "src/gui/dialogs/window.h" 32 | 33 | class geSlider; 34 | 35 | namespace giada::m 36 | { 37 | class Plugin; 38 | } 39 | 40 | namespace giada::v 41 | { 42 | class geBox; 43 | class geLiquidScroll; 44 | class gdPluginWindow : public gdWindow 45 | { 46 | public: 47 | gdPluginWindow(const c::plugin::Plugin&, ID wid); 48 | 49 | void updateParameters(bool changeSlider = false); 50 | 51 | private: 52 | c::plugin::Plugin m_plugin; 53 | 54 | geLiquidScroll* m_list; 55 | }; 56 | } // namespace giada::v 57 | 58 | #endif -------------------------------------------------------------------------------- /src/gui/elems/basics/check.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_CHECK_H 28 | #define GE_CHECK_H 29 | 30 | #include 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geCheck : public Fl_Check_Button 36 | { 37 | public: 38 | static constexpr int CHECKBOX_WIDTH = 12; 39 | 40 | geCheck(); 41 | geCheck(int x, int y, int w, int h, const char* l = nullptr); 42 | geCheck(const char* l); 43 | 44 | void draw() override; 45 | 46 | std::function onChange = nullptr; 47 | 48 | private: 49 | static void cb_onChange(Fl_Widget* w, void* p); 50 | void cb_onChange(); 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/updater.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_V_UPDATER_H 28 | #define G_V_UPDATER_H 29 | 30 | #include "src/deps/concurrentqueue/concurrentqueue.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class Ui; 37 | class Updater final 38 | { 39 | public: 40 | using Event = std::function; 41 | 42 | Updater(Ui& ui); 43 | 44 | void start(); 45 | void stop(); 46 | void run(); 47 | bool pumpEvent(const Event&); 48 | 49 | private: 50 | static void update(void*); 51 | void update(); 52 | 53 | Ui& m_ui; 54 | 55 | moodycamel::ConcurrentQueue m_eventQueue; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif -------------------------------------------------------------------------------- /src/gui/elems/config/tabPlugins.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TAB_PLUGINS_H 28 | #define GE_TAB_PLUGINS_H 29 | 30 | #include "src/deps/geompp/src/rect.hpp" 31 | #include "src/glue/config.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geInput; 37 | class geImageButton; 38 | class geTextButton; 39 | class geTabPlugins : public Fl_Group 40 | { 41 | public: 42 | geTabPlugins(geompp::Rect); 43 | 44 | void save(); 45 | void rebuild(); 46 | 47 | private: 48 | c::config::PluginData m_data; 49 | 50 | geImageButton* m_browse; 51 | geInput* m_folderPath; 52 | geTextButton* m_scanButton; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif -------------------------------------------------------------------------------- /src/gui/elems/config/tabBehaviors.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TAB_BEHAVIORS_H 28 | #define GE_TAB_BEHAVIORS_H 29 | 30 | #include "src/deps/geompp/src/rect.hpp" 31 | #include "src/glue/config.h" 32 | #include "src/gui/elems/basics/check.h" 33 | #include 34 | 35 | namespace giada::v 36 | { 37 | class geTabBehaviors : public Fl_Group 38 | { 39 | public: 40 | geTabBehaviors(geompp::Rect); 41 | 42 | private: 43 | c::config::BehaviorsData m_data; 44 | 45 | geCheck* m_chansStopOnSeqHalt; 46 | geCheck* m_treatRecsAsLoops; 47 | geCheck* m_inputMonitorDefaultOn; 48 | geCheck* m_overdubProtectionDefaultOn; 49 | }; 50 | } // namespace giada::v 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gui/elems/midiActivity.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MIDI_ACTIVITY_H 28 | #define GE_MIDI_ACTIVITY_H 29 | 30 | #include "src/gui/elems/basics/flex.h" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geMidiLed : public Fl_Button 36 | { 37 | public: 38 | geMidiLed(); 39 | 40 | void draw() override; 41 | void lit(); 42 | 43 | private: 44 | int m_decay; 45 | }; 46 | 47 | /* -------------------------------------------------------------------------- */ 48 | 49 | class geMidiActivity : public geFlex 50 | { 51 | public: 52 | geMidiActivity(bool hasOut = true); 53 | 54 | geMidiLed* out; 55 | geMidiLed* in; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/scene.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_SCENE_H 28 | #define G_SCENE_H 29 | 30 | #include "src/const.h" 31 | 32 | namespace giada 33 | { 34 | class Scene 35 | { 36 | public: 37 | constexpr Scene() noexcept = default; // Invalid scene 38 | 39 | explicit constexpr Scene(std::size_t i) noexcept 40 | : m_index(i) 41 | { 42 | assert(isValid()); 43 | } 44 | 45 | constexpr bool operator==(const Scene&) const noexcept = default; 46 | 47 | constexpr bool isValid() const { return m_index < G_INVALID_SCENE; } 48 | 49 | constexpr std::size_t getIndex() const { return m_index; }; 50 | 51 | private: 52 | std::size_t m_index = G_INVALID_SCENE; 53 | }; 54 | } // namespace giada 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/gui/dialogs/config.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_CONFIG_H 28 | #define GD_CONFIG_H 29 | 30 | #include "src/gui/dialogs/window.h" 31 | #include "src/gui/model.h" 32 | 33 | namespace giada::v 34 | { 35 | class geTabAudio; 36 | class geTabBehaviors; 37 | class geTabMidi; 38 | class geTabMisc; 39 | class geTabBindings; 40 | class geTabPlugins; 41 | class gdConfig : public gdWindow 42 | { 43 | public: 44 | gdConfig(const Model&); 45 | ~gdConfig(); 46 | 47 | geTabAudio* tabAudio; 48 | geTabBehaviors* tabBehaviors; 49 | geTabMidi* tabMidi; 50 | geTabMisc* tabMisc; 51 | geTabBindings* tabBindings; 52 | geTabPlugins* tabPlugins; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiInputBase.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/dialogs/midiIO/midiInputBase.h" 28 | #include "src/glue/io.h" 29 | #include "src/gui/ui.h" 30 | #include "src/utils/gui.h" 31 | 32 | extern giada::v::Ui* g_ui; 33 | 34 | namespace giada::v 35 | { 36 | gdMidiInputBase::gdMidiInputBase(const char* title, const Model& model) 37 | : gdWindow(u::gui::getCenterWinBounds(model.midiInputBounds), title, WID_MIDI_INPUT) 38 | { 39 | } 40 | 41 | /* -------------------------------------------------------------------------- */ 42 | 43 | gdMidiInputBase::~gdMidiInputBase() 44 | { 45 | c::io::stopMidiLearn(); 46 | 47 | g_ui->model.midiInputBounds = getBounds(); 48 | } 49 | } // namespace giada::v -------------------------------------------------------------------------------- /src/gui/elems/basics/textButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * geButton 6 | * A regular button. 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #ifndef GE_TEXT_BUTTON_H 31 | #define GE_TEXT_BUTTON_H 32 | 33 | #include "src/gui/elems/basics/button.h" 34 | 35 | namespace giada::v 36 | { 37 | class geTextButton : public geButton 38 | { 39 | public: 40 | geTextButton(int x, int y, int w, int h, const char* l); 41 | geTextButton(const char* l); 42 | 43 | void draw() override; 44 | 45 | void setPadding(int); 46 | 47 | protected: 48 | Fl_Color m_backgroundColorOff; 49 | Fl_Color m_backgroundColorOn; 50 | Fl_Color m_borderColor; 51 | Fl_Color m_textColor; 52 | 53 | private: 54 | int m_padding; 55 | }; 56 | } // namespace giada::v 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/gui/elems/soundMeter.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SOUND_METER_H 28 | #define GE_SOUND_METER_H 29 | 30 | #include "src/gui/types.h" 31 | #include "src/types.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geSoundMeter : public Fl_Box 37 | { 38 | public: 39 | geSoundMeter(Direction); 40 | 41 | void draw() override; 42 | 43 | Peak peak; // Peak from Mixer 44 | bool ready; // Kernel state 45 | 46 | private: 47 | class Meter 48 | { 49 | public: 50 | float compute(float peak); 51 | 52 | private: 53 | float m_dbLevelOld = 0.0f; 54 | }; 55 | 56 | Direction m_direction; 57 | Meter m_left; 58 | Meter m_right; 59 | }; 60 | } // namespace giada::v 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /src/core/rendering/pluginRendering.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_RENDERING_PLUGIN_RENDERING_H 28 | #define G_RENDERING_PLUGIN_RENDERING_H 29 | 30 | #include "src/core/channels/channelShared.h" 31 | 32 | namespace giada::m 33 | { 34 | class PluginHost; 35 | } 36 | 37 | namespace giada::m::rendering 38 | { 39 | /* renderAudioAndMidiPlugins 40 | Renders plug-ins using the shared juce::MidiBuffer for MIDI event rendering. It 41 | renders normal audio plug-ins too. */ 42 | 43 | void renderAudioAndMidiPlugins(const Channel&, PluginHost&); 44 | 45 | /* renderAudioPlugins 46 | Renders audio-only plug-ins. */ 47 | 48 | void renderAudioPlugins(const Channel&, PluginHost&); 49 | } // namespace giada::m::rendering 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/sampleChannelMode.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ge_modeBox 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GE_SAMPLE_CHANNEL_MODE_H 30 | #define GE_SAMPLE_CHANNEL_MODE_H 31 | 32 | #include "src/gui/elems/basics/imageButton.h" 33 | 34 | namespace giada 35 | { 36 | enum class SamplePlayerMode; 37 | } 38 | 39 | namespace giada::c::channel 40 | { 41 | struct Data; 42 | } 43 | 44 | namespace giada::v 45 | { 46 | class geSampleChannelMode : public geImageButton 47 | { 48 | public: 49 | geSampleChannelMode(int x, int y, int w, int h, c::channel::Data& d); 50 | 51 | private: 52 | void refresh(SamplePlayerMode); 53 | void openMenu(); 54 | 55 | c::channel::Data& m_channel; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/core/midiLearnParam.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/midiLearnParam.h" 28 | #include 29 | 30 | namespace giada::m 31 | { 32 | MidiLearnParam::MidiLearnParam() 33 | : m_param(0) 34 | , m_index(0) 35 | { 36 | } 37 | 38 | MidiLearnParam::MidiLearnParam(uint32_t v, std::size_t index) 39 | : m_param(v) 40 | , m_index(index) 41 | { 42 | } 43 | 44 | /* -------------------------------------------------------------------------- */ 45 | 46 | uint32_t MidiLearnParam::getValue() const 47 | { 48 | return m_param.load(); 49 | } 50 | 51 | void MidiLearnParam::setValue(uint32_t v) 52 | { 53 | m_param.store(v); 54 | } 55 | 56 | std::size_t MidiLearnParam::getIndex() const 57 | { 58 | return m_index; 59 | } 60 | } // namespace giada::m 61 | -------------------------------------------------------------------------------- /src/gui/elems/basics/scrollbar.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * geScroll 6 | * Custom scroll with nice scrollbars and something else. 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #include "src/gui/elems/basics/scrollbar.h" 31 | #include "src/gui/const.h" 32 | #include "src/gui/elems/basics/boxtypes.h" 33 | 34 | namespace giada::v 35 | { 36 | geScrollbar::geScrollbar() 37 | : Fl_Scrollbar(0, 0, 0, 0) 38 | , onScroll(nullptr) 39 | { 40 | color(G_COLOR_GREY_2); 41 | selection_color(G_COLOR_GREY_4); 42 | labelcolor(G_COLOR_LIGHT_1); 43 | slider(G_CUSTOM_BORDER_BOX); 44 | 45 | callback([](Fl_Widget* w) 46 | { 47 | const geScrollbar* self = static_cast(w); 48 | if (self->onScroll) 49 | self->onScroll(self->value()); 50 | }); 51 | } 52 | } // namespace giada::v 53 | -------------------------------------------------------------------------------- /src/core/patch.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/patch.h" 28 | 29 | namespace geompp 30 | { 31 | void to_json(nlohmann::json& j, const giada::SampleRange& r) 32 | { 33 | j = nlohmann::json{{"a", r.a}, {"b", r.b}}; 34 | } 35 | 36 | void from_json(const nlohmann::json& j, giada::SampleRange& r) 37 | { 38 | r.a = j.value("a", 0); 39 | r.b = j.value("b", 0); 40 | } 41 | } // namespace geompp 42 | 43 | /* -------------------------------------------------------------------------- */ 44 | 45 | namespace mcl::utils 46 | { 47 | void to_json(nlohmann::json& j, const Id& id) 48 | { 49 | j = id.getValue(); 50 | } 51 | 52 | void from_json(const nlohmann::json& j, Id& id) 53 | { 54 | id = Id(j.get()); 55 | } 56 | } // namespace mcl::utils 57 | -------------------------------------------------------------------------------- /src/gui/elems/basics/boxtypes.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * boxtypes 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #include "src/gui/elems/basics/boxtypes.h" 30 | #include "src/gui/const.h" 31 | #include 32 | 33 | void g_customBorderBox(int x, int y, int w, int h, Fl_Color c) 34 | { 35 | fl_color(c); 36 | fl_rectf(x, y, w, h); 37 | fl_color(G_COLOR_GREY_4); 38 | fl_rect(x, y, w, h); 39 | } 40 | 41 | void g_customUpBox(int x, int y, int w, int h, Fl_Color /*c*/) 42 | { 43 | fl_color(G_COLOR_GREY_2); 44 | fl_rectf(x, y, w, h); 45 | fl_color(G_COLOR_GREY_2); 46 | fl_rect(x, y, w, h); 47 | } 48 | 49 | void g_customDownBox(int x, int y, int w, int h, Fl_Color c) 50 | { 51 | fl_color(c); 52 | fl_rectf(x, y, w, h); 53 | fl_color(G_COLOR_GREY_2); 54 | fl_rect(x, y, w, h); 55 | } 56 | -------------------------------------------------------------------------------- /src/gui/elems/config/tabBindings.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_CONFIG_TAB_BINDINGS_H 28 | #define GE_CONFIG_TAB_BINDINGS_H 29 | 30 | #include "src/deps/geompp/src/rect.hpp" 31 | #include "src/gui/model.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geCheck; 37 | class geInput; 38 | class geKeyBinder; 39 | class geTabBindings : public Fl_Group 40 | { 41 | public: 42 | geTabBindings(geompp::Rect, const Model&); 43 | 44 | private: 45 | geKeyBinder* play; 46 | geKeyBinder* rewind; 47 | geKeyBinder* recordActions; 48 | geKeyBinder* recordInput; 49 | geKeyBinder* exit; 50 | SceneArray scenes; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/groupChannelButton.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/elems/mainWindow/keyboard/groupChannelButton.h" 28 | #include "src/glue/channel.h" 29 | #include "src/gui/ui.h" 30 | #include 31 | 32 | extern giada::v::Ui* g_ui; 33 | 34 | namespace giada::v 35 | { 36 | geGroupChannelButton::geGroupChannelButton(const c::channel::Data& d) 37 | : geChannelButton(d) 38 | { 39 | } 40 | 41 | /* -------------------------------------------------------------------------- */ 42 | 43 | void geGroupChannelButton::refresh() 44 | { 45 | const std::string l = m_channel.name.empty() ? g_ui->getI18Text(LangMap::MAIN_CHANNEL_DEFAULTGROUPNAME) : m_channel.name; 46 | copy_label(l.c_str()); 47 | redraw(); 48 | } 49 | } // namespace giada::v 50 | -------------------------------------------------------------------------------- /src/gui/elems/sampleEditor/shiftTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SHIFT_TOOL_H 28 | #define GE_SHIFT_TOOL_H 29 | 30 | #include "src/gui/elems/basics/flex.h" 31 | #include "src/types.h" 32 | 33 | namespace giada::c::sampleEditor 34 | { 35 | struct Data; 36 | } 37 | 38 | namespace giada::v 39 | { 40 | class geInput; 41 | class geBox; 42 | class geTextButton; 43 | class geShiftTool : public geFlex 44 | { 45 | public: 46 | geShiftTool(const c::sampleEditor::Data& d); 47 | 48 | void rebuild(const c::sampleEditor::Data& d); 49 | void update(Frame shift); 50 | 51 | private: 52 | const c::sampleEditor::Data* m_data; 53 | 54 | geBox* m_label; 55 | geInput* m_shift; 56 | geTextButton* m_reset; 57 | }; 58 | } // namespace giada::v 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/gui/elems/plugin/pluginParameter.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PLUGIN_PARAMETER_H 28 | #define GE_PLUGIN_PARAMETER_H 29 | 30 | #include "src/glue/plugin.h" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geSlider; 36 | class geBox; 37 | class gePluginParameter : public Fl_Group 38 | { 39 | public: 40 | gePluginParameter(int x, int y, int w, int labelWidth, const c::plugin::Param); 41 | 42 | void update(const c::plugin::Param& p, bool changeSlider); 43 | 44 | private: 45 | static void cb_setValue(Fl_Widget* /*w*/, void* p); 46 | void cb_setValue(); 47 | 48 | const c::plugin::Param m_param; 49 | 50 | geBox* m_label; 51 | geSlider* m_slider; 52 | geBox* m_value; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_INPUT_H 28 | #define GE_MAIN_INPUT_H 29 | 30 | #include "src/glue/main.h" 31 | #include "src/gui/elems/basics/flex.h" 32 | 33 | namespace giada::v 34 | { 35 | class geDial; 36 | class geSoundMeter; 37 | class geImageButton; 38 | class geMidiLed; 39 | class geMainInput : public geFlex 40 | { 41 | public: 42 | geMainInput(); 43 | 44 | void refresh(); 45 | void rebuild(); 46 | 47 | void setInVol(float v); 48 | void setMidiInActivity(); 49 | 50 | private: 51 | c::main::IO m_io; 52 | 53 | geSoundMeter* m_inMeter; 54 | geDial* m_inVol; 55 | geImageButton* m_inToOut; 56 | geImageButton* m_masterFxIn; 57 | geMidiLed* m_midiIn; 58 | }; 59 | } // namespace giada::v 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/core/actions/action.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_ACTION_H 28 | #define G_ACTION_H 29 | 30 | #include "src/core/midiEvent.h" 31 | #include "src/core/types.h" 32 | #include "src/scene.h" 33 | #include "src/types.h" 34 | 35 | namespace giada::m 36 | { 37 | struct Action 38 | { 39 | ID id; 40 | ID channelId; 41 | Scene scene; 42 | Frame frame; 43 | MidiEvent event; 44 | ID pluginId; 45 | int pluginParam = -1; 46 | ID prevId = {}; 47 | ID nextId = {}; 48 | 49 | bool isValid() const 50 | { 51 | return id.isValid(); 52 | } 53 | 54 | bool isVolumeEnvelope() const 55 | { 56 | return event.getStatus() == MidiEvent::CHANNEL_CC && pluginId.isValid(); 57 | } 58 | }; 59 | } // namespace giada::m 60 | 61 | #endif -------------------------------------------------------------------------------- /src/core/rendering/midiAdvance.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/rendering/midiAdvance.h" 28 | #include "src/core/channels/channel.h" 29 | #include "src/core/rendering/midiOutput.h" 30 | #include "src/core/rendering/midiReactions.h" 31 | 32 | namespace giada::m::rendering 33 | { 34 | void advanceMidiChannel(const Channel& ch, const Sequencer::Event& e, KernelMidi& kernelMidi) 35 | { 36 | switch (e.type) 37 | { 38 | case Sequencer::EventType::FIRST_BEAT: 39 | rewindMidiChannel(ch.shared->playStatus); 40 | break; 41 | 42 | case Sequencer::EventType::ACTIONS: 43 | if (ch.isPlaying()) 44 | sendMidiFromActions(ch, e.scene, *e.actions, e.delta, kernelMidi); 45 | break; 46 | 47 | default: 48 | break; 49 | } 50 | } 51 | } // namespace giada::m::rendering 52 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainOutput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_OUTPUT_H 28 | #define GE_MAIN_OUTPUT_H 29 | 30 | #include "src/glue/main.h" 31 | #include "src/gui/elems/basics/flex.h" 32 | 33 | namespace giada::v 34 | { 35 | class geDial; 36 | class geSoundMeter; 37 | class geTextButton; 38 | class geImageButton; 39 | class geMidiLed; 40 | class geMainOutput : public geFlex 41 | { 42 | public: 43 | geMainOutput(); 44 | 45 | void refresh(); 46 | void rebuild(); 47 | 48 | void setOutVol(float v); 49 | void setMidiOutActivity(); 50 | 51 | private: 52 | c::main::IO m_io; 53 | 54 | geSoundMeter* m_outMeter; 55 | geDial* m_outVol; 56 | geImageButton* m_masterFxOut; 57 | geMidiLed* m_midiOut; 58 | }; 59 | } // namespace giada::v 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/utils/log.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * log 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #include "src/utils/log.h" 30 | #include "src/deps/mcl-utils/src/fs.hpp" 31 | #include 32 | #include 33 | 34 | namespace utils = mcl::utils; 35 | 36 | namespace giada::u::log 37 | { 38 | bool init(int m) 39 | { 40 | mode = m; 41 | if (mode == LOG_MODE_FILE) 42 | { 43 | std::string fpath = utils::fs::join(fs::getConfigDirPath(), "giada.log"); 44 | file.open(fpath, std::fstream::out | std::fstream::app); 45 | if (!file.is_open()) 46 | return false; 47 | } 48 | return true; 49 | } 50 | 51 | /* -------------------------------------------------------------------------- */ 52 | 53 | void close() 54 | { 55 | if (mode == LOG_MODE_FILE) 56 | file.close(); 57 | } 58 | } // namespace giada::u::log 59 | -------------------------------------------------------------------------------- /src/gui/dialogs/actionEditor/sampleActionEditor.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_SAMPLE_ACTION_EDITOR_H 28 | #define GD_SAMPLE_ACTION_EDITOR_H 29 | 30 | #include "src/gui/dialogs/actionEditor/baseActionEditor.h" 31 | 32 | namespace giada::v 33 | { 34 | class geSampleActionEditor; 35 | class geVelocityEditor; 36 | class geChoice; 37 | class gdSampleActionEditor : public gdBaseActionEditor 38 | { 39 | public: 40 | gdSampleActionEditor(ID channelId, const Model&); 41 | 42 | void rebuild() override; 43 | 44 | int getActionType() const; 45 | 46 | private: 47 | bool canChangeActionType(); 48 | 49 | geSampleActionEditor* m_sampleActionEditor; 50 | geVelocityEditor* m_velocityEditor; 51 | geChoice* m_actionType; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/channelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_CHANNEL_BUTTON_H 28 | #define GE_CHANNEL_BUTTON_H 29 | 30 | #include "src/gui/elems/playButton.h" 31 | #include 32 | #include 33 | 34 | namespace giada::c::channel 35 | { 36 | struct Data; 37 | } 38 | 39 | namespace giada::v 40 | { 41 | class geChannelButton : public gePlayButton 42 | { 43 | public: 44 | geChannelButton(const c::channel::Data& d); 45 | 46 | virtual void refresh(); 47 | 48 | void draw() override; 49 | 50 | void setInputRecordState(); 51 | void setActionRecordState(); 52 | 53 | protected: 54 | const c::channel::Data& m_channel; 55 | 56 | private: 57 | std::unique_ptr m_imgExtraOuputs; 58 | }; 59 | } // namespace giada::v 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/sampleChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SAMPLE_CHANNEL_H 28 | #define GE_SAMPLE_CHANNEL_H 29 | 30 | #include "src/glue/channel.h" 31 | #include "src/gui/elems/mainWindow/keyboard/channel.h" 32 | 33 | namespace giada::v 34 | { 35 | class geImageButton; 36 | class geSampleChannelMode; 37 | class geSampleChannel : public geChannel 38 | { 39 | public: 40 | geSampleChannel(int x, int y, int w, int h, c::channel::Data d); 41 | 42 | void resize(int x, int y, int w, int h) override; 43 | void draw() override; 44 | 45 | void refresh() override; 46 | 47 | geSampleChannelMode* modeBox; 48 | geImageButton* readActionsBtn; 49 | 50 | private: 51 | void openMenu(); 52 | void readActions(); 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/gui/elems/basics/tableWidget.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TABLE_WIDGET_H 28 | #define GE_TABLE_WIDGET_H 29 | 30 | #include "src/gui/elems/basics/tableBase.h" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | /* geTable 36 | A table where each cell contains a Fl_Widget. */ 37 | 38 | class geTableWidget : public geTableBase 39 | { 40 | public: 41 | virtual Fl_Widget* getCellContent(int row, int col, geompp::Rect cellBounds) const = 0; 42 | virtual std::string getHeaderText(int col) const = 0; 43 | 44 | void init(); 45 | 46 | protected: 47 | geTableWidget(); 48 | 49 | private: 50 | void draw_cell(TableContext, int row, int col, int x, int y, int w, int h) override; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserDir.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/dialogs/browser/browserDir.h" 28 | #include "src/gui/elems/basics/imageButton.h" 29 | #include "src/gui/elems/basics/input.h" 30 | #include "src/gui/elems/basics/textButton.h" 31 | #include "src/gui/elems/fileBrowser.h" 32 | #include "src/gui/ui.h" 33 | #include "src/utils/fs.h" 34 | 35 | extern giada::v::Ui* g_ui; 36 | 37 | namespace giada::v 38 | { 39 | gdBrowserDir::gdBrowserDir(const std::string& title, const std::string& path, 40 | std::function cb, const Model& model) 41 | : gdBrowserBase(title, path, cb, {}, model) 42 | { 43 | hidePathName(); 44 | 45 | ok->label(g_ui->getI18Text(LangMap::COMMON_SELECT)); 46 | ok->onClick = [this]() 47 | { fireCallback(); }; 48 | } 49 | } // namespace giada::v 50 | -------------------------------------------------------------------------------- /src/gui/elems/sampleEditor/rangeTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_RANGE_TOOL_H 28 | #define GE_RANGE_TOOL_H 29 | 30 | #include "src/gui/elems/basics/flex.h" 31 | #include "src/types.h" 32 | 33 | namespace giada::c::sampleEditor 34 | { 35 | struct Data; 36 | } 37 | 38 | namespace giada::v 39 | { 40 | class geInput; 41 | class geBox; 42 | class geTextButton; 43 | class geRangeTool : public geFlex 44 | { 45 | public: 46 | geRangeTool(const c::sampleEditor::Data& d); 47 | 48 | void rebuild(const c::sampleEditor::Data& d); 49 | void update(SampleRange range); 50 | 51 | private: 52 | const c::sampleEditor::Data* m_data; 53 | 54 | geBox* m_label; 55 | geInput* m_begin; 56 | geInput* m_end; 57 | geTextButton* m_reset; 58 | }; 59 | } // namespace giada::v 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/velocityEditor.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_VELOCITY_EDITOR_H 28 | #define GE_VELOCITY_EDITOR_H 29 | 30 | #include "src/gui/elems/actionEditor/baseActionEditor.h" 31 | 32 | namespace giada::v 33 | { 34 | class geVelocityEditor : public geBaseActionEditor 35 | { 36 | public: 37 | geVelocityEditor(Pixel x, Pixel y, gdBaseActionEditor*); 38 | 39 | void draw() override; 40 | 41 | void rebuild(c::actionEditor::Data& d) override; 42 | 43 | private: 44 | void onMoveAction() override; 45 | void onRefreshAction() override; 46 | void onAddAction() override {}; 47 | void onDeleteAction() override {}; 48 | void onResizeAction() override {}; 49 | 50 | Pixel valueToY(float v) const; 51 | float yToValue(Pixel y) const; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/core/idManager.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/core/idManager.h" 28 | 29 | namespace giada::m 30 | { 31 | void IdManager::set(ID id) 32 | { 33 | if (id.isValid() && id > m_id) 34 | m_id = id; 35 | } 36 | 37 | /* -------------------------------------------------------------------------- */ 38 | 39 | ID IdManager::generate(ID id) 40 | { 41 | if (id.isValid()) 42 | { 43 | m_id = id; 44 | return id; 45 | } 46 | return ++m_id; 47 | } 48 | 49 | /* -------------------------------------------------------------------------- */ 50 | 51 | ID IdManager::get() const 52 | { 53 | return m_id; 54 | } 55 | 56 | /* -------------------------------------------------------------------------- */ 57 | 58 | ID IdManager::getNext() const 59 | { 60 | return m_id + 1; 61 | } 62 | } // namespace giada::m 63 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/gridTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_GRID_TOOL_H 28 | #define GE_GRID_TOOL_H 29 | 30 | #include "src/gui/model.h" 31 | #include "src/gui/types.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geCheck; 37 | class geChoice; 38 | class geGridTool : public Fl_Group 39 | { 40 | public: 41 | geGridTool(Pixel x, Pixel y, const Model&); 42 | ~geGridTool(); 43 | 44 | int getValue() const; 45 | bool isOn() const; 46 | 47 | Frame getSnapFrame(Frame f, Frame framesInBeat) const; 48 | 49 | /* getCellSize 50 | Returns the size in frames of a single cell of the grid. */ 51 | 52 | Frame getCellSize(Frame framesInBeat) const; 53 | 54 | private: 55 | geChoice* gridType; 56 | geCheck* active; 57 | }; 58 | } // namespace giada::v 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /tests/waveFactory.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/waveFactory.h" 2 | #include "../src/core/const.h" 3 | #include "../src/core/resampler.h" 4 | #include "../src/core/wave.h" 5 | #include 6 | 7 | using namespace giada::m; 8 | 9 | TEST_CASE("waveFactory") 10 | { 11 | constexpr int SAMPLE_RATE = 44100; 12 | constexpr int BUFFER_SIZE = 4096; 13 | constexpr int G_CHANNELS = 2; 14 | constexpr auto TEST_WAV_PATH = TEST_RESOURCES_DIR "test.wav"; 15 | 16 | SECTION("test creation") 17 | { 18 | waveFactory::Result res = waveFactory::createFromFile(TEST_WAV_PATH, 19 | /*ID=*/{}, /*sampleRate=*/SAMPLE_RATE, Resampler::Quality::LINEAR); 20 | 21 | REQUIRE(res.status == G_RES_OK); 22 | REQUIRE(res.wave->getRate() == SAMPLE_RATE); 23 | REQUIRE(res.wave->getBuffer().countChannels() == G_CHANNELS); 24 | REQUIRE(res.wave->isLogical() == false); 25 | REQUIRE(res.wave->isEdited() == false); 26 | } 27 | 28 | SECTION("test recording") 29 | { 30 | std::unique_ptr wave = waveFactory::createEmpty(BUFFER_SIZE, 31 | G_MAX_IO_CHANS, SAMPLE_RATE, "test.wav"); 32 | 33 | REQUIRE(wave->getRate() == SAMPLE_RATE); 34 | REQUIRE(wave->getBuffer().countFrames() == BUFFER_SIZE); 35 | REQUIRE(wave->getBuffer().countChannels() == G_CHANNELS); 36 | REQUIRE(wave->isLogical() == true); 37 | REQUIRE(wave->isEdited() == false); 38 | } 39 | 40 | SECTION("test resampling") 41 | { 42 | waveFactory::Result res = waveFactory::createFromFile(TEST_WAV_PATH, 43 | /*ID=*/{}, /*sampleRate=*/SAMPLE_RATE, Resampler::Quality::LINEAR); 44 | 45 | int oldSize = res.wave->getBuffer().countFrames(); 46 | waveFactory::resample(*res.wave.get(), Resampler::Quality::LINEAR, SAMPLE_RATE * 2); 47 | 48 | REQUIRE(res.wave->getRate() == SAMPLE_RATE * 2); 49 | REQUIRE(res.wave->getBuffer().countFrames() == oldSize * 2); 50 | REQUIRE(res.wave->getBuffer().countChannels() == G_CHANNELS); 51 | REQUIRE(res.wave->isLogical() == false); 52 | REQUIRE(res.wave->isEdited() == false); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/waveReading.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/resampler.h" 2 | #include "../src/core/wave.h" 3 | #include "../src/utils/vector.h" 4 | #include "src/core/rendering/sampleRendering.h" 5 | #include 6 | #include 7 | 8 | TEST_CASE("WaveReading") 9 | { 10 | using namespace giada; 11 | 12 | constexpr int BUFFER_SIZE = 1024; 13 | constexpr int NUM_CHANNELS = 2; 14 | 15 | m::Wave wave({}); 16 | wave.getBuffer().alloc(BUFFER_SIZE, NUM_CHANNELS); 17 | wave.getBuffer().forEachFrame([](float* f, int i) 18 | { 19 | f[0] = static_cast(i + 1); 20 | f[1] = static_cast(i + 1); 21 | }); 22 | m::Resampler resampler; 23 | 24 | SECTION("Test fill, pitch 1.0") 25 | { 26 | mcl::AudioBuffer out(BUFFER_SIZE, NUM_CHANNELS); 27 | 28 | SECTION("Regular fill") 29 | { 30 | m::rendering::ReadResult res = rendering::readWave(wave, out, 31 | /*start=*/0, BUFFER_SIZE, /*offset=*/0, /*pitch=*/1.0f, resampler); 32 | 33 | bool allFilled = true; 34 | int numFramesFilled = 0; 35 | out.forEachFrame([&allFilled, &numFramesFilled](const float* f, int) 36 | { 37 | if (f[0] == 0.0f) 38 | allFilled = false; 39 | else 40 | numFramesFilled++; 41 | }); 42 | 43 | REQUIRE(allFilled); 44 | REQUIRE(numFramesFilled == res.used); 45 | REQUIRE(numFramesFilled == res.generated); 46 | } 47 | 48 | SECTION("Partial fill") 49 | { 50 | m::rendering::ReadResult res = rendering::readWave(wave, out, 51 | /*start=*/0, BUFFER_SIZE, /*offset=*/BUFFER_SIZE / 2, /*pitch=*/1.0f, resampler); 52 | 53 | int numFramesFilled = 0; 54 | out.forEachFrame([&numFramesFilled](const float* f, int) 55 | { 56 | if (f[0] != 0.0f) 57 | numFramesFilled++; 58 | }); 59 | 60 | REQUIRE(numFramesFilled == BUFFER_SIZE / 2); 61 | REQUIRE(out[(BUFFER_SIZE / 2) - 1][0] == 0.0f); 62 | REQUIRE(out[BUFFER_SIZE / 2][0] != 0.0f); 63 | REQUIRE(numFramesFilled == res.used); 64 | REQUIRE(numFramesFilled == res.generated); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/gui/elems/basics/imageButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_IMAGE_BUTTON_H 28 | #define GE_IMAGE_BUTTON_H 29 | 30 | #include "src/gui/elems/basics/button.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geImageButton : public geButton 37 | { 38 | public: 39 | geImageButton(int x, int y, int w, int h, const char* imgOff, const char* imgOn, const char* imgDisabled = nullptr); 40 | geImageButton(const char* imgOff, const char* imgOn, const char* imgDisabled = nullptr); 41 | 42 | void draw() override; 43 | 44 | protected: 45 | void draw(Fl_SVG_Image*); 46 | 47 | std::unique_ptr m_imgOff; 48 | std::unique_ptr m_imgOn; 49 | std::unique_ptr m_imgDisabled; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserLoad.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/dialogs/browser/browserLoad.h" 28 | #include "src/gui/elems/basics/imageButton.h" 29 | #include "src/gui/elems/basics/input.h" 30 | #include "src/gui/elems/basics/textButton.h" 31 | #include "src/gui/elems/fileBrowser.h" 32 | #include "src/gui/ui.h" 33 | #include "src/utils/fs.h" 34 | 35 | extern giada::v::Ui* g_ui; 36 | 37 | namespace giada::v 38 | { 39 | gdBrowserLoad::gdBrowserLoad(const std::string& title, const std::string& path, 40 | std::function cb, ID channelId, const Model& model) 41 | : gdBrowserBase(title, path, cb, channelId, model) 42 | { 43 | hidePathName(); 44 | 45 | ok->label(g_ui->getI18Text(LangMap::COMMON_LOAD)); 46 | ok->onClick = [this]() 47 | { fireCallback(); }; 48 | } 49 | } // namespace giada::v 50 | -------------------------------------------------------------------------------- /src/gui/elems/keyBinder.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_KEY_BINDER_H 28 | #define GE_KEY_BINDER_H 29 | 30 | #include "src/gui/elems/basics/flex.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geBox; 37 | class geTextButton; 38 | /* TODO - this class is VERY similar to geMidiLearner. */ 39 | class geKeyBinder : public geFlex 40 | { 41 | public: 42 | geKeyBinder(const std::string& l, int key); 43 | 44 | int getKey() const; 45 | 46 | std::function onKeyBound; 47 | std::function onKeyClear; 48 | 49 | private: 50 | void setKey(int key); 51 | 52 | int m_key; 53 | geBox* m_labelBox; 54 | geBox* m_keyBox; 55 | geTextButton* m_bindBtn; 56 | geTextButton* m_clearBtn; 57 | }; 58 | } // namespace giada::v 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/gui/elems/basics/tabs.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "src/gui/elems/basics/tabs.h" 28 | #include "src/gui/const.h" 29 | #include "src/gui/elems/basics/boxtypes.h" 30 | 31 | namespace giada::v 32 | { 33 | geTabs::geTabs(geompp::Rect r) 34 | : Fl_Tabs(r.x, r.y, r.w, r.h) 35 | { 36 | box(G_CUSTOM_BORDER_BOX); 37 | labelcolor(G_COLOR_LIGHT_2); 38 | end(); 39 | } 40 | 41 | /* -------------------------------------------------------------------------- */ 42 | 43 | void geTabs::add(Fl_Widget* wg) 44 | { 45 | constexpr int TAB_HEIGHT = 25; 46 | 47 | wg->resize(x(), y() + TAB_HEIGHT, w(), h() - TAB_HEIGHT); 48 | wg->labelsize(G_GUI_FONT_SIZE_BASE); 49 | wg->selection_color(G_COLOR_GREY_4); 50 | 51 | Fl_Tabs::add(wg); 52 | resizable(wg); // To keep the tab height constant during resizing 53 | } 54 | } // namespace giada::v 55 | -------------------------------------------------------------------------------- /src/gui/elems/playButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PLAY_BUTTON_H 28 | #define GE_PLAY_BUTTON_H 29 | 30 | #include "src/gui/elems/basics/textButton.h" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | /* gePlayButton 36 | A text button with three states: play, ending and default (idle). Used for 37 | buttons that display transitions between a 'play' and an 'ending' state such 38 | as the Scene or the Channel buttons. */ 39 | 40 | class gePlayButton : public geTextButton 41 | { 42 | public: 43 | gePlayButton(const std::string& label = ""); 44 | 45 | void setPlayState(); 46 | void setEndingState(); 47 | void setDefaultState(); 48 | 49 | /* blink 50 | Utility method to make the button blink. Call this on each refresh. */ 51 | 52 | void blink(bool blinkState); 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | --------------------------------------------------------------------------------