Skip to content

Commit

Permalink
Merge branch 'master' into its-a-cold-ride-dear
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Computerscare.cpp
  • Loading branch information
AdamPorcineFudgepuppy committed Jun 7, 2024
2 parents 4d80091 + 4f8f2ef commit ab22825
Show file tree
Hide file tree
Showing 12 changed files with 537 additions and 29 deletions.
38 changes: 28 additions & 10 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build v2
on: [push, pull_request]
on: [workflow_dispatch]

env:
rack-sdk-version: 2.1.0
rack-sdk-version: 2.5.2

defaults:
run:
Expand All @@ -22,7 +22,12 @@ jobs:
}
- {
name: MacOS,
os: macos-latest,
os: macos-13,
prepare-os: ""
}
- {
name: MacOS-arm,
os: macos-14,
prepare-os: ""
}
- {
Expand All @@ -31,31 +36,42 @@ jobs:
prepare-os: export CC=gcc
}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV

- name: Patch plugin.mk, use 7zip on Windows
if: runner.os == 'Windows'
run: |
pushd $HOME
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-win.zip
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-win-x64.zip
unzip Rack-SDK.zip
sed -i 's/zip -q -9 -r/7z a -tzip -mx=9/' $HOME/Rack-SDK/plugin.mk
- name: Get Mac SDK
if: runner.os == 'MacOS'
run: |
pushd $HOME
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac.zip
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-x64+arm64.zip
unzip Rack-SDK.zip
- name: Get Mac arm SDK
if: runner.os == 'MacOS-arm'
run: |
pushd $HOME
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-x64+arm64.zip
unzip Rack-SDK.zip
- name: Get Linux SDK
if: runner.os == 'Linux'
run: |
pushd $HOME
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-lin.zip
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-lin-x64.zip
unzip Rack-SDK.zip
- name: Modify plugin version
# only modify plugin version if no tag was created
if: "! startsWith(github.ref, 'refs/tags/v')"
Expand All @@ -64,14 +80,16 @@ jobs:
pluginversion=`jq -r '.version' plugin.json`
echo "Set plugin version from $pluginversion to $pluginversion-$gitrev"
cat <<< `jq --arg VERSION "$pluginversion-$gitrev" '.version=$VERSION' plugin.json` > plugin.json
- name: Build plugin
run: |
${{ matrix.config.prepare-os }}
export RACK_DIR=$HOME/Rack-SDK
make -j dep
make -j dist
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: dist
name: computerscare-modules-2.git.${{ github.sha }}-${{ matrix.config.name }}
Expand All @@ -84,7 +102,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: FranzDiebold/github-env-vars-action@v1.2.1
- name: Check if plugin version matches tag
run: |
Expand All @@ -105,7 +123,7 @@ jobs:
Built against Rack SDK version:${{ env.rack-sdk-version }}
draft: false
prerelease: false
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
path: _artifacts
- name: Uggh Hugly
Expand Down
133 changes: 133 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Build VCV Rack Plugin
on: [push, pull_request]

env:
rack-sdk-version: latest
rack-plugin-toolchain-dir: /home/build/rack-plugin-toolchain

defaults:
run:
shell: bash

jobs:

modify-plugin-version:
name: Modify plugin version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: plugin-version-cache
with:
path: plugin.json
key: ${{ github.sha }}-${{ github.run_id }}
- run: |
gitrev=`git rev-parse --short HEAD`
pluginversion=`jq -r '.version' plugin.json`
echo "Set plugin version from $pluginversion to $pluginversion-$gitrev"
cat <<< `jq --arg VERSION "$pluginversion-$gitrev" '.version=$VERSION' plugin.json` > plugin.json
# only modify plugin version if no tag was created
if: "! startsWith(github.ref, 'refs/tags/v')"
build:
name: ${{ matrix.platform }}
needs: modify-plugin-version
runs-on: ubuntu-latest
container:
image: ghcr.io/qno/rack-plugin-toolchain-win-linux
options: --user root
strategy:
matrix:
platform: [win-x64, lin-x64]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
id: plugin-version-cache
with:
path: plugin.json
key: ${{ github.sha }}-${{ github.run_id }}
- name: Build plugin
run: |
export PLUGIN_DIR=$GITHUB_WORKSPACE
pushd ${{ env.rack-plugin-toolchain-dir }}
make plugin-build-${{ matrix.platform }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
name: ${{ matrix.platform }}

build-mac:
name: mac
needs: modify-plugin-version
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
platform: [x64, arm64]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
id: plugin-version-cache
with:
path: plugin.json
key: ${{ github.sha }}-${{ github.run_id }}
- name: Get Rack-SDK
run: |
pushd $HOME
wget -O Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-x64+arm64.zip
unzip Rack-SDK.zip
- name: Build plugin
run: |
CROSS_COMPILE_TARGET_x64=x86_64-apple-darwin
CROSS_COMPILE_TARGET_arm64=arm64-apple-darwin
export RACK_DIR=$HOME/Rack-SDK
export CROSS_COMPILE=$CROSS_COMPILE_TARGET_${{ matrix.platform }}
make dep
make dist
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: dist/*.vcvplugin
name: mac-${{ matrix.platform }}

publish:
name: Publish plugin
# only create a release if a tag was created that is called e.g. v1.2.3
# see also https://vcvrack.com/manual/Manifest#version
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: [build, build-mac]
steps:
- uses: actions/checkout@v4
- uses: FranzDiebold/github-env-vars-action@v2
- name: Check if plugin version matches tag
run: |
pluginversion=`jq -r '.version' plugin.json`
if [ "v$pluginversion" != "${{ env.CI_REF_NAME }}" ]; then
echo "Plugin version from plugin.json 'v$pluginversion' doesn't match with tag version '${{ env.CI_REF_NAME }}'"
exit 1
fi
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Release ${{ env.CI_REF_NAME }}
body: |
${{ env.CI_REPOSITORY_NAME }} VCV Rack Plugin ${{ env.CI_REF_NAME }}
draft: false
prerelease: false
- uses: actions/download-artifact@v4
with:
path: _artifacts
- name: Upload release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: _artifacts/**/*.vcvplugin
tag: ${{ github.ref }}
file_glob: true
20 changes: 19 additions & 1 deletion CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
1.2.0
# 2.1.7
- Update build to use plugin build toolchain github actions image
- Toly Pools v2 adds CV values to knob values as is the standard
- Fix Toly Pools v2 crash when disconnecting input cable

# 2.1.1
Toly Pools
- Make a new module with new slug, Toly Pools v2 with better rotation options and behavior
- New Toly Pools v2 has Auto output channels mode by default, and positive/negative rotation
- Deprecate the old Toly Pools. It will still work in old patches, but won't show up in browser

# 2.1.0
Father & Son Patch Sequencer
- changed font to one with license suitable for cardinal

# 2.0.x and before
- a bunch of stuff

# 1.2.0
Laundry Soup
- Fix regression which made patches load incorrectly
- Add right-click options for polyphony
Expand Down
32 changes: 21 additions & 11 deletions doc/laundry-soup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Laundry Soup
Laundry Soup is a trigger sequencer that takes text as input. If you connect a clock signal to the "clk" input, and type `1` in the top text box, the top "out" output will send a trigger each clock. `2` sends a trigger every 2 clock signals. `31` sends a trigger on the 1st and 4th clock signals, and then repeats this pattern forever or until reset.

![Laundry Soup](./doc/laundry-soup-basic-2.png)
![Laundry Soup](./laundry-soup-basic-2.png)


### Text Input:
Expand Down Expand Up @@ -30,7 +30,7 @@ The input and output of the 2nd row is:
~~~~


In The 3rd row:`2131@8`, the "@8" means: repeat the pattern every 8 clock signals. In this case the original pattern has length 7 (2 + 1 + 3 + 1 = 7), so normally it would repeat every 7 clock signals.
In The 3rd row:`2131@8`, the `@8` means: repeat the pattern every 8 clock signals. In this case the original pattern has length 7 (2 + 1 + 3 + 1 = 7), so normally it would repeat every 7 clock signals.

~~~~
2131 ---> x-xx--x (repeating after 7 beats)
Expand All @@ -47,23 +47,30 @@ A rest can be programmed by using the number "0". If Laundry Soup is triggered
07 ---> -x------
00004 ---> ----x---
~~~~


Another way to generate the backbeat pattern using the @ symbol:
~~~~
0@4,4 ---> ----x---
~~~~


The 5th row shows how multiple patterns can be combined. `311@16,2@16` means: `311` for 16 beats, and then `2` for 16 beats.
~~~~
311@16 ---> x--xxx--xxx--xxx
2@16 ---> x-x-x-x-x-x-x-x-
311@16,2@16 ---> x--xxx--xxx--xxxx-x-x-x-x-x-x-x-
~~~~

The bottom pattern could also be written like this, using square brackets:
~~~~
[311,2]@16 ---> x--xxx--xxx--xxxx-x-x-x-x-x-x-x-
~~~~

Comma-separated patterns inside square brackets, and followed by an `@` will sequentially output each pattern for the specified number of beats. For the pattern above, it will output: `311` for 16 beats, and then `2` for 16 beats.



The 6th row shows a way to "skip" beats. `@4` all by itself means: wait 4 beats with no trigger. This is another way to generate the backbeat pattern as the 4th row example.
~~~~
@4,4 ---> ----x---
~~~~

### How to program lengths longer than 9 beats:
To program a rhythm that divides the incoming clock by 16, the proper input is NOT `16`. Values greater than 9 steps must be enclosed in angle brackets `<16>`
Expand All @@ -77,7 +84,7 @@ To program a rhythm that divides the incoming clock by 16, the proper input is N


### Input Jacks:
![ComputerscarePatchSequencer](./doc/laundry-soup-inputs-1.png)
![ComputerscarePatchSequencer](./laundry-soup-inputs-1.png)

**Global Clock (clk):** Increases each row's absoluteStep by 1.

Expand All @@ -90,7 +97,7 @@ To program a rhythm that divides the incoming clock by 16, the proper input is N

### Output Jacks:

![ComputerscarePatchSequencer](./doc/laundry-soup-outputs-1.png)
![ComputerscarePatchSequencer](./laundry-soup-outputs-1.png)


**Individual Row Output (out):** The output of the row's pattern. Outputs 10 volts if:
Expand All @@ -100,13 +107,16 @@ A) The clock signal is sent to the Global Clock or Individual Clock input jack
B) The pattern ought to trigger on this absoluteStep
~~~~

**Individual Row First Step Output (one):** Sends a trigger on the 1st step of the row's pattern.
**Individual Row EOC Output (eoc):** Sends a trigger on the 1st step of the row's pattern.


### Displays:

The display shows a few things:

- Top row: Which step number the sequence is currently on, starting with 1
- Bottom row: The total length of the pattern
- If the display is red, that means the pattern has a pending change and will switch to the newly typed pattern when it reaches step 1. ie: changing the pattern is sync'd to the old pattern length. Click the display to force the pattern to reset on the next clock.

*Inspired by Frank Buss's Formula, Ryan Kirkbride's FoxDot, SuperCollider*

Expand Down
9 changes: 7 additions & 2 deletions doc/poly-utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ Sequentially output the individual channel voltages of a polyphonic signal. Con

* Display input channel count
* CV output of the input channel count (1 - 16 channels is linearly mapped to 0 - 10 volts)
* Knob and CV for setting output channel count (0 - 10 volts linearly mapped to 1-16 output channels)
* Knob and CV for rotating the polyphonic signal (0 - 10 volts sets rotation of 0-15 channels. For example: rotation of "1" will move input channel 2 -> output channel 1, input channel 3->output channel 2, ... input channel 16 -> output channel 1)
* Knob and CV for setting output channel count (0 - 10 volts linearly mapped to 1-16 output channels). CV value is multiplied by 1.6 and added to knob value
* Knob and CV for rotating the polyphonic signal (-10v thru +10v sets rotation of -16 to +16 channels. For example: rotation of "1" will move input channel 2 -> output channel 1, input channel 3->output channel 2, ... input channel 16 -> output channel 1). CV value is multiplied by 1.6 and added to knob value.
* The default output polyphony setting is "A": Automatic which will set the output polyphony equal to the input polyphony
* Different rotation modes via context menu:
- "Repeat Input Channels": If the output polyphony is set higher than input polyphony (channel count), the input channels will be repeated to fill the output
- "Rotate Through Maximum of Output, Input Channels": If the output polyphony is higher than the input polyphony, all input channels will be used and the remainder will be filled with 0v
- "Rotate Through 16 Channels (Legacy)": The input signal will be padded to 16 channels polyphony with 0v always. This is the "old" Toly Pools behavior, and results in a lot of 0v signals.


### Poly Channels Knob
Expand Down
Loading

0 comments on commit ab22825

Please sign in to comment.