jq is useful utility, but I use it infrequently and each time I have to check what was the filters syntax. This cheat sheet helps we to recall what is the expression that I need. Hopefully it would help others too. For full guide refer to the official jq manual.
With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.
For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.
In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:
- Go to your computers/phones settings
- Ensure Bluetooth is turned on
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #8 note polyphony gated synth setup program | |
| #by Robin Newman, August 2017 | |
| #Set initial states for polyphonic synth | |
| set :vm1,0 | |
| set :vm2,0 | |
| set :vm3,0 | |
| set :vm4,0 | |
| set :vm5,0 | |
| set :vm6,0 | |
| set :vm7,0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sonic Pi Sequencer (beta) | |
| # Not yet music, but a proof of concept and part of a toolbox to | |
| # create pattern based music | |
| # Rather than think about durations and time distances I'd like to think of | |
| # bars and patterns. Something like that: | |
| # | 16 | 1 | e | u | e | 2 | e | u | e | 3 | e | u | e | 4 | e | u | e | | |
| # |----------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---| | |
| # | Bass | x | | x | x | | | x | | | x | | | | | x | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sonic Pi Sequencer (v2) | |
| # Simplified notation of synth lines, can now play chords | |
| use_debug false | |
| set_volume! 1 | |
| use_bpm 120 # beat = quarter note | |
| # TODO | |
| # Make 'play_rhythm_bar' to work with an array of samples like 'play_melody_bar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # AFX Song Sketch | |
| use_debug false | |
| set_volume! 1 | |
| use_bpm 128 # beat = quarter note | |
| # TODO | |
| # Shaker | |
| # Rework the tune synth | |
| # Break at 19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # AFX 1.7, prepare the tune | |
| use_debug false | |
| set_volume! 1 | |
| use_bpm 128 | |
| load_samples [:loop_compus, :elec_wood, :drum_bass_hard, :drum_snare_hard, :drum_snare_hard, :drum_cymbal_closed, :elec_snare, :drum_tom_hi_soft] | |
| # Helper Functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # AFX 1.7, play the tune | |
| use_debug false | |
| set_volume! 1 | |
| use_bpm 128 | |
| puts "01" | |
| mod_shaker | |
| mod_bordun | |
| sleep 16 |
NewerOlder