mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 19:30:11 +01:00
Merge branch 'master' of https://github.com/langolierz/r_e_c_u_r
This commit is contained in:
28
README.md
28
README.md
@@ -3,22 +3,18 @@
|
||||
|
||||
![vectorfront][vectorfront]
|
||||
|
||||
__r_e_c_u_r__ is a fully customizable hardware video sampler. the open source python application is built around a _raspberry pi3_ that uses `input` from a _keypad_ to control omxplayer's `video out` while `displaying` a simple text user interface on a _rpi lcd screen_
|
||||
__r_e_c_u_r__ is an embedded python application on _raspberry pi3_ that uses `input` from the _keypad_ to control omxplayer's `video out` while displaying a simple text user interface on the _rpi lcd screen_
|
||||
|
||||
## features
|
||||
|
||||
- seamlessly loop video through rpi's HDMI or composite out
|
||||
- intuitively _browse_ video files on a usb and map them into __r_e_c_u_r__
|
||||
- intuitively _browse_ video files on an external usb or internally and map them into __r_e_c_u_r__
|
||||
- load and trigger video samples from numbered slots in the _sampler_ bank
|
||||
- dynamically set and clear the start/end points of each sample as it plays
|
||||
- configure the _settings_ menu to suit your use
|
||||
|
||||
### more coming soon:
|
||||
|
||||
- ~~composite video out (hopefully)~~
|
||||
- midi controlled
|
||||
- more playback modes and options
|
||||
- optional extention for live sampling
|
||||
- control and sequence all inputs and more with midi-usb
|
||||
- optional extention for live sampling through the pi camera input
|
||||
- many sampler modes for varied playback including: repeat, one-shot, gated, random, fixed-length, random-start and more
|
||||
- exhaustive and extendable _settings_ menu to suit your use
|
||||
|
||||
### other feature ideas
|
||||
|
||||
@@ -33,21 +29,21 @@ i started a [board] of some features i would like to explore
|
||||
## documentation:
|
||||
|
||||
- [operating] - how to use r_e_c_u_r
|
||||
- [building] - how to build r_e_c_u_r
|
||||
- [building] - how to diy r_e_c_u_r
|
||||
- [developing] - how to contribute to r_e_c_u_r
|
||||
|
||||
## status
|
||||
|
||||
The nature of this project is to be open-ended and community driven. my r_e_c_u_r already solves the problems i intially built it for. what happens next depends on how it is used and recieved by you. if you like the idea please consider getting involved. Currently:
|
||||
The nature of this project is to be open-ended and community driven. my r_e_c_u_r already solves the problems i intially built it for. what happens next depends on how it is used and recieved by you. if you like the idea please consider getting involved.
|
||||
|
||||
- the _software_ is at a MVP status; the basic functionally is there and should work as expected. no doubt there are both known and unknown bugs around the edges (let me know whats impacting you!). this is also only the beginning of whats possible using python on a raspberry pi. i will continue to maintain and improve it, but in what direction and velocity depends on the users
|
||||
- the only _hardware_ option currently avaliable is the `diy enclosure`; this is designed be low cost, hackable and accessable. you can modify and 3d print/laser cut your own case, the recommended keypad and lcd parts are the cheapest i could find (with some compromises), basically aiming to get these in the hands of as many other diy-er as interested. if there is any interest i have plans to offer a limited `boutique enclosure` option at some point - professional custom cut aluminum cover , hand wired mechanical keys , real vinyl printed stickers, no compromises! (another future idea : a eurorack version based on raspi3 compute)
|
||||
|
||||
- the only _hardware_ option currently avaliable is the `diy enclosure`; this is designed be low cost, hackable and accessable. you can modify and 3d print/laser cut your own case, the recommended keypad and lcd parts are the cheapest i could find (with some compromises), basicly aiming to get these in the hands of as many other diy-er as interested. i also have plans to offer a limited `boutique enclosure` option at some point in the future - professional custom cut aluminuim cover , hand wired mechanical keys , real vinyl printed stickers, no compromises! this will probably coincide with a larger software release in near future if theres any interest (another future idea : a eurorack version based of raspi3 compute)
|
||||
|
||||
## contact
|
||||
## contact and donation
|
||||
|
||||
langolierz@gmail.com
|
||||
|
||||
all feedback is apreciated. if you want to donate to this project you can do so with the above email via paypal : everything i receive will go into making __r_e_c_u_r__ better.
|
||||
|
||||
[vectorfront]: ./documentation/vectorfront.png
|
||||
[board]: https://trello.com/b/mmJJFyrp/feature-ideas
|
||||
[operating]: documentation/operate_docs.md
|
||||
|
||||
@@ -28,7 +28,6 @@ picamera | interface with capture | BSD
|
||||
mido | interface with midi | MIT
|
||||
python-rt-midi | midi backend | MIT / modified MIT
|
||||
gpac (mp4box) | creating mp4 file | LGPL
|
||||
mscorefonts | the current display font (may need to change this) | freeware under a [proprietary license]
|
||||
git | used to install and update | GPL-2.0
|
||||
|
||||
## some research / thoughts about how licences work and interact.
|
||||
@@ -43,11 +42,10 @@ some [interesting discussion] around difference between modifying a gpl program
|
||||
- if it is part of the os it is ok.
|
||||
- if it is not 2-way interacting / sharing datastructures etc - just an input -> output usage it is ok
|
||||
|
||||
there is no restrictions to permissive installer scripts downloading gpl licensed programs (or even the freeware fonts it seems)
|
||||
there is no restrictions to permissive installer scripts downloading gpl licensed programs
|
||||
|
||||
[license]: ../LICENSE.md
|
||||
[GPL-3.0]: https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
[proprietary license]: https://en.wikipedia.org/wiki/Core_fonts_for_the_Web
|
||||
[markings]: https://wiki.creativecommons.org/wiki/Marking/Creators/Marking_third_party_content
|
||||
[interesting discussion]: https://softwareengineering.stackexchange.com/questions/289785/can-i-distribute-a-gpl-executable-not-a-library-in-a-closed-source-application
|
||||
[Creative Commons Attribution-ShareAlike 4.0 International License]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
|
||||
@@ -2,33 +2,37 @@
|
||||
|
||||
## getting started
|
||||
|
||||
- insert a usb with some videos you want to sample
|
||||
- connect the hdmi output to the display you want to use
|
||||
- power the raspberry pi. you should see red lights on the pi board, some boot text on the hdmi out and the lcd display light up
|
||||
- after a few moments , a video should play on the display output , the raspberian desktop will load on lcd and then (after a few moments) the r_e_c_u_r display will load
|
||||
- prepare a usb with some videos you want to sample
|
||||
- connect the hdmi output or composite (via [3.5mm trrs]) to the display you want to use
|
||||
- power the raspberry pi. you should see red lights on the pi board, the lcd display light up and the r_e_c_u_r splash screen on your video output
|
||||
- after a few moments the interface should appear on lcd screen.
|
||||
- the `DSPLY` key can be used to cycle through _display_modes_
|
||||
|
||||
## controls
|
||||
|
||||
(put picture with controls here...)
|
||||
|
||||
the controls on r_e_c_u_r work by mapping `keys` to `actions`. (custom mappings ?) by default most keys map to the same action independent of the state (ie display mode) the r_e_c_u_r is in.
|
||||
the controls on r_e_c_u_r work by mapping `keys` to `actions`. this map can be fully customised by editing the respective json file.
|
||||
|
||||
The exceptions to this are the control keys:
|
||||
the default layout uses a hard mapping for every key except the `<` - `>` - `■` in red. this means every other key triggers the same actions independent of the state r_e_c_u_r is in.
|
||||
|
||||
- `<` and `>` : used for navigation when applicable (see below) ; used for seeking current sample in `SAMPLER` mode
|
||||
- `■` : used as 'enter' for navigation ; used to toggle pause/play in `SAMPLER` mode.
|
||||
the _control keys_ ,`<` - `>` - `■` use a soft mapping. the action they trigger depends on the state , displayed on screen as `control_mode` in red.
|
||||
|
||||
these let you navigate and select folders, video files and settings when in `BROWSER` / `SETTINGS` mode, and by default control video playback (seek forward and back, pause/play) of the currently playing [NOW] sample in `SAMPLER` mode.
|
||||
|
||||
the display modes `SAMPLER`, `BROWSER` and `SETTINGS` are cycled by using the `DSPLY` key.
|
||||
|
||||
some actions are accessible through a _function_ layer, toggled by the `FN` key.
|
||||
|
||||
the display modes described below are cycled by using the `DSPLY` key. some actions are accessible through a `FN` layer, toggled by the corresponding key.
|
||||
other controls include:
|
||||
|
||||
- `→` is used to trigger the next loaded sample to play
|
||||
- loading the sample in slot `x` to play next; where `x` is a key from `0` to `9`
|
||||
- `→` is used to switch the [NEXT] loaded sample to the [NOW] current sample
|
||||
- loading the sample in slot `x` into [NEXT]; where `x` is a key from `0` to `9`
|
||||
- cropping the current sample to start (`[`) or end (`]`) at the current time
|
||||
- cycling forward back (`PRV BNK`) or (`NXT BNK`) through the banks of sample , or clearing a bank (`CLR BNK`) (note not implemented yet)
|
||||
- `< SPD` and `> SPD` are used to decrease and increase the speed of the currently playing clip (note not implemented yet)
|
||||
- cycling forward (`PRV BNK`) or back (`NXT BNK`) through the banks of sampleS , or clearing a bank (`CLR BNK`)
|
||||
- ~~`< SPD` and `> SPD` are used to decrease and increase the speed of the currently playing clip (note not implemented yet)~~
|
||||
|
||||
some keys are empty to leave room for future features. i encourage you to make a custom key map (link to doc) or add actions (another link) you would like to use.
|
||||
some keys are empty to leave room for future features and user experimentation. i encourage you to modify your keymap or add custom actions you would like to use.
|
||||
|
||||
## parts of the lcd display
|
||||
|
||||
@@ -38,18 +42,7 @@ some keys are empty to leave room for future features. i encourage you to make a
|
||||
|
||||
![player_example][player_example]
|
||||
|
||||
this section displays information about what is in the video player : the position from start and end of currently playing video, what [slot] is playing now and what slot is loaded [next]
|
||||
|
||||
## `BROWSER` display mode
|
||||
|
||||
![browser_example][browser_example]
|
||||
|
||||
this is where you can load samples from your usb into the `SAMPLER`
|
||||
|
||||
- in this mode , the `<` and `>` keys will move the selection up and down
|
||||
- folders are displayed ending in `|` for closed and `/` for open , the depth is displayed as indentation
|
||||
- pressing the `■` key while a folder is selected toggles it open/closed
|
||||
- pressing the `■` key while a video is selected loads it into the next available slot (note : you can see the first slot a video is loaded into on right column)
|
||||
this section displays information about what is in the video player : the position from the start and the end of currently playing video (yellow), what slot is playing [NOW] and what slot is loaded [NEXT]
|
||||
|
||||
## `SAMPLER` display mode
|
||||
|
||||
@@ -57,21 +50,39 @@ this is where you can load samples from your usb into the `SAMPLER`
|
||||
|
||||
this is the main display mode for using r_e_c_u_r. from this view you can see details of all the samples loaded into the sampler. a `bank` contains 10 `slots` labelled `0` - `9`. pressing the corresponding `key` will load the `sample` in this `slot` to start when the current sample finishes. the `slot` of the currently playing sample is highlighted.
|
||||
|
||||
## `BROWSER` display mode
|
||||
|
||||
![browser_example][browser_example]
|
||||
|
||||
this is where you can load samples from your usb or internal Videos folder into the `SAMPLER`
|
||||
|
||||
- in this mode , the `<` and `>` keys will move the selection up and down
|
||||
- folders are displayed ending in `|` for closed and `/` for open , the depth is displayed as indentation
|
||||
- pressing the `■` key while a folder is selected toggles it open/closed
|
||||
- pressing the `■` key while a video is selected loads it into the next available slot (note : you can see the first slot a video is loaded into on right column)
|
||||
|
||||
## `SETTINGS` display mode
|
||||
|
||||
![settings_example][settings_example]
|
||||
|
||||
this is where you can configure r_e_c_u_r's settings.
|
||||
|
||||
- navigate the menu with `<` and `>` keys like about
|
||||
- pressing `■` on a setting will either cycle through it's `options` or run an `action` depending on its type (an `action` setting will always have value `run_action`)
|
||||
- navigate the menu with `<` and `>` keys like above
|
||||
- pressing `■` on a setting will either cycle through it's `options` or run an `action` depending on its type
|
||||
|
||||
## `MESSAGE DISPLAY`
|
||||
|
||||
the bottom line shows the `control_mode` by default, but is also for messages:
|
||||
|
||||
- shows a yellow bar when _function_ layer is selected
|
||||
- shows a blue bar for `INFO` messages
|
||||
- shows a red bar for `ERROR` messages - full message and trace for these can be found in the log files
|
||||
|
||||
(put image and info here)
|
||||
|
||||
[3.5mm trrs]: https://www.adafruit.com/product/2881
|
||||
[display_image]: display_parts.jpg
|
||||
[player_example]: player_example.jpg
|
||||
[browser_example]: browser_example.jpg
|
||||
[sampler_example]: sampler_example.jpg
|
||||
[settings_example]: settings_example.jpg
|
||||
[settings_example]: settings_example.jpg
|
||||
|
||||
@@ -23,7 +23,7 @@ then `sudo apt update` and `sudo apt upgrade` , sudo reboot
|
||||
|
||||
- download/install pixel + all the extra things needed for r_e_c_u_r :
|
||||
```
|
||||
sudo apt-get install -y raspberrypi-ui-mods git python3-tk ttf-mscorefonts-installer omxplayer libdbus-glib-1-dev python3-pip unclutter python3-picamera gpac
|
||||
sudo apt-get install -y raspberrypi-ui-mods git python3-tk omxplayer libdbus-glib-1-dev python3-pip unclutter python3-picamera gpac
|
||||
|
||||
pip3 install dbus-python omxplayer-wrapper mido python-rtmidi
|
||||
```
|
||||
@@ -43,21 +43,21 @@ then `sudo apt update` and `sudo apt upgrade` , sudo reboot
|
||||
|
||||
and remove the line `@point-rpi`
|
||||
|
||||
(im not sure exactly what each part does and if it works but is suppose to stop screensaver / hide cursor / remove on screen power warnings etc)
|
||||
these are suppose to stop screensaver / hide cursor / remove on screen power warnings etc
|
||||
|
||||
- i then went into pi item -> Preferences and set a black background , small task bar , no screensaver and went into the file explorer -> Edit -> Preferences -> Volume Managment -> unchecked 'show available options for removable media ...'
|
||||
|
||||
and made taskbar auto hide...
|
||||
|
||||
creating internal storage folder in ~/Videos
|
||||
created internal storage folder in ~/Videos
|
||||
|
||||
splash screen : can set a custom splash screen by setting an image at `/usr/share/plymouth/themes/pix/splash.png` , i made a copy of the original : `sudo cp /usr/share/plymouth/theme/pix/splash-old.png` and then copied my own from a flash stick...
|
||||
splash screen : can set a custom splash screen by setting an image at `/usr/share/plymouth/themes/pix/splash.png` , i made a copy of the original, and then copied my own from a flash stick...
|
||||
|
||||
## lcd display drivers
|
||||
|
||||
these are the drivers for the waveshare displays that work on the cheep lcd i ordered online ( [LCD-show-170703] ).
|
||||
|
||||
my screen only needs the LCD35-show and LCD-hdmi scripts. after running both of these scripts the drivers can be deleted since the recur code then handles the switching.
|
||||
my screen only needs the LCD35-show-180 and LCD-hdmi scripts. after running both of these scripts the drivers can be deleted since the recur code then handles the switching.
|
||||
|
||||
## lines added to config.txt
|
||||
|
||||
@@ -77,35 +77,23 @@ sdtv_mode=0
|
||||
sdtv_aspect=1
|
||||
|
||||
## switch for enabling lcd screen (the next line is being used even if its commented out)
|
||||
dtoverlay=waveshare35a:rotate=270
|
||||
##no_waveshare_overlay
|
||||
```
|
||||
|
||||
## changes to the cmdline.txt
|
||||
|
||||
`quiet splash logo.nologo plymouth.ignore-serial-consoles` for quiet boot with splash screen
|
||||
|
||||
## making the config.txt and driver file writable so python can edit it
|
||||
|
||||
i need to update the config.txt to change various video settings etc. at first i was running bash scripts from within python to do this. ~~i think it is better for all the logic to be done from inside the code, although my program does not have the permission needed to update these files. instead of giving the program root access , i want to just make the files it needs to edit writable.~~
|
||||
|
||||
~~`sudo chmod 777 /boot/config.txt` and `sudo chmod 777 /usr/share/X11/xorg.conf.d/99-fbturbo.conf` i know this is kinda bad , but need some way of doing it ?~~
|
||||
|
||||
the above didnt work. also dbus not working in sudo. i am checking (reading) w python and writing with bash scripts.
|
||||
|
||||
## flashing
|
||||
|
||||
first remove my wifi connection !
|
||||
|
||||
i am trying to flash the device using the unix command `dd` on a raspberry pi.
|
||||
i will flash the device using the unix command `dd` on a raspberry pi.
|
||||
|
||||
- i want my image to not contain empty space so it can fit on smaller sd cards (4gigs)
|
||||
|
||||
- first check how much space is needed and name of device : `df -h`
|
||||
|
||||
- ~~do i need to mount the device : ??~~
|
||||
|
||||
couldnt figure out how to not take entire card (including empty space) , so decided to try entire 4gg card, to a usb and then try compressing in down :
|
||||
|
||||
- `dd if=/dev/mmcblk0 of=/media/pi/FLASH DRIVE/recur.img`
|
||||
- `gzip -k recur.img` (to keep original)
|
||||
|
||||
@@ -115,11 +103,11 @@ going to copy and zip in one (with larger byte size) :
|
||||
|
||||
## removing empty space on pi image
|
||||
|
||||
i had another go at this and might have had some success using [pishrink], following the instructions on readme exactly , i managed to reduce a 3.8gg image down to 2.9gg and then zipped down to 1.15gg (no saving here) , this would be more useful with larger cards though.
|
||||
i had another go at this and might have had some success using [pishrink], following the instructions on readme exactly , i managed to reduce a 3.8gg image down to 2.9gg and then zipped down to 1.15gg, (this would be more useful with larger cards though).
|
||||
|
||||
- the flow is using dd to copy the image from the pi to an external drive `dd if=/dev/mmcblk0 of=/media/pi/FLASH DRIVE/recur.img`
|
||||
|
||||
- then use pishrink to reduce this image `sudo pishrink.sh recur.img`
|
||||
- then use pishrink to reduce this image `sudo pishrink.sh recur.img` <- try without auto disk expand ?
|
||||
|
||||
- then gzip to zip this : `sudo gzip recur.img`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user