Skip to content

Commit

Permalink
feat: Select region on jump to song, fixes #1 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Feb 9, 2024
1 parent 7ce988e commit 8e31603
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
My musical band uses an IEM setup for rehearsals and live shows.
This setup is based on a [USB audio interface](https://www.behringer.com/product.html?modelCode=P0B2J) and software mixing in [REAPER](https://www.reaper.fm/).

In REAPER we use named regions for songs, and simple sends from input channels to personal channels with a hardware output for each band member.
In REAPER we use named regions for songs and simple sends from input channels to personal channels with a hardware output for each band member.

To simplify mixing we use a web control feature of REAPER and each band member does mixing of their output from a phone. Fortunately, REAPER already includes an interface that allows doing just that - `more_me.html`. Unfortunately, though, this interface doesn't allow switching tracks or starting or stopping playback.

Expand Down Expand Up @@ -69,3 +69,8 @@ The example project has some more tracks so here is a brief explanation of their
- The audio group is for tracks where you would put pre-recorded WAV files, like backtracks and vocal backtracks
- The input group is for tracks having a physical input source, like a guitar or a microphone. If any additional processing is needed (compression, eq, reverb), it should be put on these tracks
- The output group is for tracks with physical outputs. All of these tracks have plugins for basic hearing safety - a `-10 dB` gain and a brick-wall limiter at `0 dB`. These tracks have "Receives" from input group tracks and audio group tracks.


## Notes

When a specific song (region) is selected from the UI, it selects the region and sets the cursor to the beginning of the region. Selecting the region allows stopping the playback automatically when the region ends. For REAPER to stop the playback automatically you need to check `Preferences` -> `Audio` -> `Playback` -> `[x] Stop playback at end of loop if repeat is disabled.` and disable repeat in your project.
3 changes: 2 additions & 1 deletion src/Data/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface StopAction {
interface MoveAction {
type: "Move";
pos: number;
end: number;
}

interface SetTrackVolumeAction {
Expand Down Expand Up @@ -107,7 +108,7 @@ export function actionsToCommands(actions: Action[]): string {
case "Stop":
return "40667;TRANSPORT";
case "Move":
return `SET/POS/${action.pos};TRANSPORT`;
return `SET/POS/${action.end};40626;SET/POS/${action.pos};40625;TRANSPORT`;
case "SetTrackVolume":
return `SET/TRACK/${action.track}/VOL/${action.volume}`;
case "SetSendVolume":
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function ReaperProvider(p: ReaperProps) {
client.run({ type: "Stop" }, false);
},
moveToRegion(region) {
client.run({ type: "Move", pos: region.startTime }, false);
client.run({ type: "Move", pos: region.startTime, end: region.endTime }, false);
},
setOutputVolume(id, volume) {
client.run({ type: "SetTrackVolume", track: id, volume }, true);
Expand Down

0 comments on commit 8e31603

Please sign in to comment.