Skip to content

Commit d9bc2d3

Browse files
authored
Add licence text to all source files (#412)
* Add licence text to all source files * Add a note about the license comment to contribution guidelines * Add a note about experimental libraries
1 parent b0edac1 commit d9bc2d3

File tree

115 files changed

+1574
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1574
-47
lines changed

contributing.md

+47-4
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ Just write any labels that apply to your program, including any not listed here
163163

164164
### File Naming
165165

166-
Please use all lowercase and separate words with underscores for your program names. If additional resources are needed, such as image files, a directory with the same name and suffixed with `docs` can be included. e.g. the files associated with a program for a Sample and Hold function would look as follows:
166+
Please use all lowercase and separate words with underscores for your program names. If additional resources are needed, such as image files, a directory with the same name and suffixed with `-docs` can be included. e.g. the files associated with a program for a Sample and Hold function would look as follows:
167167

168168
```
169169
software/contrib
170-
├── sample_and_hold_docs
170+
├── sample_and_hold-docs
171171
│   └── sample_and_hold.png
172172
├── sample_and_hold.md
173173
├── sample_and_hold.py
@@ -177,12 +177,33 @@ software/contrib
177177

178178
In order to be included in the menu a program needs to meet a few additional requirements. See [menu.md](/software/contrib/menu.md) for details. Programs are not required to participate in the menu in order to be accepted, but it is nice.
179179

180-
181-
182180
## Firmware
183181

184182
Changes to firmware code must adhere to more stringent requirements than other changes. Firmware changes have the potential to affect every contrib script that runs on the EuroPi as well as the behavior of the module itself. Any change must have a clear and well described purpose and be well tested against the suite of available contrib scripts.
185183

184+
### Experimental Libraries
185+
186+
User-contributed additions to the firmware, or code intended to be re-used across multiple `contrib` programs should be placed in the `firmware/experimental` directory:
187+
188+
```
189+
software/
190+
├── contrib/
191+
│   └── my_program.md
192+
│   └── my_program.py
193+
│   └── your_program.md
194+
├── firmware/
195+
│   ├── experimental/
196+
│   | └── my_common_features.py
197+
```
198+
199+
Examples of user-contributed shared code include:
200+
- lockable knobs
201+
- screensaver
202+
- quantizer
203+
- euclidean pattern generator
204+
- custom fonts
205+
- additional `math` and `random` functions included in standard Python3, but not included in MicroPython
206+
186207
### Code Style Requirements
187208

188209
The main codebase (all code outside of `/software/contrib` and `/tests/contrib`) follows the Black style format and a GitHub CI Action will verify if this is the case for
@@ -203,3 +224,25 @@ Changes or additions to public API functions must include the corresponding upda
203224
### Testing
204225

205226
All existing automated tests must pass. An effort should be made to improve the test suite by adding tests for new or changed functionality.
227+
228+
## License
229+
230+
All software in this repository is licensed under the [Apache 2.0](/software/LICENSE) license. In accordance with this license, please place a comment block at the top of your Python source files indicating the copyright and license:
231+
232+
```python
233+
# Copyright [YEAR] Allen Synthesis
234+
#
235+
# Licensed under the Apache License, Version 2.0 (the "License");
236+
# you may not use this file except in compliance with the License.
237+
# You may obtain a copy of the License at
238+
#
239+
# http://www.apache.org/licenses/LICENSE-2.0
240+
#
241+
# Unless required by applicable law or agreed to in writing, software
242+
# distributed under the License is distributed on an "AS IS" BASIS,
243+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
244+
# See the License for the specific language governing permissions and
245+
# limitations under the License.
246+
```
247+
248+
Please substitute `[YEAR]` with the current year, e.g. `2025`.

software/contrib/arp.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/usr/bin/env python3
2+
# Copyright 2024 Allen Synthesis
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215
"""Arpeggiator & ascending/descending scale generator
316
417
Outputs ascending/descending quantized CV, with additional outputs

software/contrib/bernoulli_gates.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
from time import sleep_ms
316
from random import random
@@ -218,4 +231,4 @@ def main(self):
218231

219232
if __name__ == "__main__":
220233
bernoulli_gates = BernoulliGates()
221-
bernoulli_gates.main()
234+
bernoulli_gates.main()

software/contrib/bezier.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/usr/bin/env python3
2+
# Copyright 2024 Allen Synthesis
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215
"""
316
Generates random voltages based on Bezier curves
417

software/contrib/binary_counter.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
from europi_script import EuroPiScript
316

software/contrib/bit_garden.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
try:
215
# Local development
316
from software.firmware import europi_config

software/contrib/clock_mod.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/usr/bin/env python3
2+
# Copyright 2024 Allen Synthesis
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215
"""Clock multiplier & divider
316
"""
417

software/contrib/coin_toss.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
from random import random
316
from time import sleep_ms, ticks_ms, ticks_add, ticks_diff

software/contrib/consequencer.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2022 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
import machine
316
from time import ticks_diff, ticks_ms

software/contrib/conway.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/usr/bin/env python3
2+
# Copyright 2023 Allen Synthesis
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215
"""Implements Conway's Game of Life as a pseudo-random LFO kernel
316
417
Outputs 1-3 are 0-10V control voltages, outputs 4-6 are 5V gates

software/contrib/custom_font_demo.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2023 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
"""
215
Custom font demo
316
author: François Georgy (https://github.com/francoisgeorgy)
@@ -76,4 +89,4 @@ def main(self):
7689

7790
if __name__ == "__main__":
7891
oled.contrast(0) # dim the display
79-
CustomFontDemo().main()
92+
CustomFontDemo().main()

software/contrib/cvecorder.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
from time import ticks_diff, ticks_ms, sleep_ms
316
from random import randint, uniform
@@ -473,4 +486,4 @@ def updateScreen(self):
473486

474487
if __name__ == '__main__':
475488
dm = CVecorder()
476-
dm.main()
489+
dm.main()

software/contrib/daily_random.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
from europi_script import EuroPiScript
316

software/contrib/dscn2.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
"""
215
Binary tree based looping gate sequencer
316
"""

software/contrib/egressus_melodiam.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
import machine
316
from time import ticks_diff, ticks_ms

software/contrib/envelope_generator.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2024 Allen Synthesis
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from europi import *
215
from europi_script import EuroPiScript
316

software/contrib/euclid.py

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
#!/usr/bin/env python3
2+
# Copyright 2023 Allen Synthesis
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215
"""Euclidean rhythm generator for the EuroPi
316
417
@author Chris Iverach-Brereton <[email protected]>
5-
@author Brian House
6-
@year 2011, 2023
7-
8-
This script contains code released under the MIT license, as
9-
noted below
18+
@year 2023
1019
"""
1120

1221
import random

0 commit comments

Comments
 (0)