Skip to content

Commit 6d6ab82

Browse files
authored
Merge pull request #16 from gpstar81/queues
Documentation update for GPStar Audio XL
2 parents 97f7235 + 5ef8a68 commit 6d6ab82

4 files changed

Lines changed: 91 additions & 23 deletions

File tree

GPStarAudio.ini

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,64 @@
11
[gpstarconfig]
2-
volume_amplifier = 0
3-
volume_aux = 0
4-
serial_baud_rate = 57600
5-
led_off = 0
2+
volumeAmplifier = 0
3+
volumeAux = 0
4+
ledOff = false
65

7-
[gpstartracks]
8-
gp1_playback = normal
6+
[gpstarmode]
7+
gp1_mode = repeat
8+
gp2_mode = normal
9+
gp3_mode = normal
10+
gp4_mode = repeat
11+
gp5_mode = repeat
12+
gp6_mode = normal
13+
gp7_mode = normal
14+
gp8_mode = normal
15+
gp9_mode = normal
16+
gp10_mode = normal
17+
18+
[gpstartrigger]
919
gp1_trigger = press
10-
gp1_file_number = 1
20+
gp2_trigger = press
21+
gp3_trigger = press
22+
gp4_trigger = press
23+
gp5_trigger = press
24+
gp6_trigger = press
25+
gp7_trigger = press
26+
gp8_trigger = press
27+
gp9_trigger = hold
28+
gp10_trigger = press
29+
30+
[gpstarplayback]
31+
gp1_playback = stop
32+
gp2_playback = pause
33+
gp3_playback = stop
34+
gp4_playback = restart
35+
gp5_playback = pause
36+
gp6_playback = stop
37+
gp7_playback = stop
38+
gp8_playback = stop
39+
gp9_playback = stop
40+
gp10_playback = pause
41+
42+
[gpstartracks]
43+
gp1_track = 1
44+
gp2_track = 100
45+
gp3_track = 111
46+
gp4_track = 111
47+
gp5_track = 111
48+
gp6_track = 111
49+
gp7_track = 111
50+
gp8_track = 111
51+
gp9_track = 111
52+
gp10_track = 500
53+
54+
[gpstartrackvolume]
1155
gp1_volume = 0
12-
gp2_playback = loop
13-
gp2_trigger = hold
14-
gp2_file_number = 1
15-
gp2_volume = 0
56+
gp2_volume = 0
57+
gp3_volume = -5
58+
gp4_volume = -10
59+
gp5_volume = -20
60+
gp6_volume = -30
61+
gp7_volume = -40
62+
gp8_volume = -50
63+
gp9_volume = 0
64+
gp10_volume = 0

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,30 @@ Up to 20 triggering pins are availble on the GPStar Audio XL. They have JST-PH 2
179179
| TX2/RX2 | TX2/RX2 | Alternative serial communication port used for debugging. |
180180
| TEST | | A button located on the lower right corner of the board. Pressing this button will play the first track on the micro SD card. |
181181

182-
## Configuration file
182+
## Configuration file and syntax usage
183183
A configuration file is not required. However you can configure some settings by placing a `GPStarAudio.ini` configuration file into the root of the micro SD card. An example file can be found in this repository. If a configuration file is not found on the micro SD card the default settings are used.
184184

185185
Many options can be set, such as the default output amplifier gain, serial communication baud rate, LED settings and to how the trigger pins handle playback.
186186

187187
The syntax of the file is very simple, using enclosed square brackets to setup configuration areas.
188188

189+
Example syntax is as follows:
190+
191+
**[gpstarconfig]**
192+
<br>volume&#95;amplifier = 10
<br>volume&#95;aux = 0
<br>serial&#95;baud&#95;rate = 57600
<br>led&#95;off = 0
193+
194+
**[gpstarmode]**
<br>gp1&#95;mode = repeat
<br>gp2&#95;mode = normal
195+
196+
**[gpstartrigger]**
<br>gp1&#95;trigger = press
<br>gp2&#95;trigger = hold
197+
198+
**[gpstarplayback]**
<br>gp1&#95;playback = stop
<br>gp2&#95;playback = pause
199+
200+
**[gpstartracks]**
<br>gp1&#95;track = 1
<br>gp2&#95;track = 100
201+
202+
**[gpstartrackvolume]**
<br>gp1&#95;volume = 0
<br>gp2&#95;volume = -25
203+
204+
## System configuration
205+
189206
**[gpstarconfig]:** This area can set the general settings of the board. If none of these settings exist in the ini file, then the system will default to the default settings for each option.
190207

191208
**volume&#95;amplifier:** This sets the master gain (in dB) of the stereo speaker amplifier. The range is `-53` (quietest) to `24` (loudest). The default is `0`.
@@ -196,20 +213,22 @@ The syntax of the file is very simple, using enclosed square brackets to setup c
196213

197214
**led&#95;off:** Control whether the onboard status LED flashes or not during playback or non playback. Valid values are 0 for allowing the LED to function or `1` for disabling the LED. The default is `0`.
198215

199-
## Trigger configuration
200-
Unique to GPStar Audio XL are the trigger pins. These can be setup so you can play sounds without any coding. You can also conigure the behaviour of these pins by setting them up into the GPStarAudio.ini configuration file. Please refer to the example configuration file located in this repository for usage.
216+
## Triggering configuration
217+
Unique to GPStar Audio XL are the triggering pins. These can be setup so you can play sounds without any coding. You can also conigure the behaviour of these pins by setting them up into the GPStarAudio.ini configuration file. Please refer to the example configuration file located in this repository for usage.
201218

202219
Note that these do not need to be configured for the trigger pins to operate and if `GPStarAudio.ini` is not on the micro SD card the default settings are loaded for the trigger pins.
203220

204-
**[gpstartracks]:** This area contains playback setup and configuration of the 20 trigger pins. The pins are identified by gp1_ prefix in the ini file. The range is from `gp1_` up to `gp20_`.
221+
This area contains playback setup and configuration of the 20 triggering pins. The pins are identified by gp1_ prefix in the ini file. The range is from `gp1_` up to `gp20_`.
222+
223+
**[gpstarmode]:** Valid settings for this is `normal`, or `repeat`. Normal plays the track and it stops when it finishes. Repeat will make the track loop forever unless re triggered again to do something else.
205224

206-
**gp#&#95;playback:** Control how the playback is assigned to this trigger. Valid settings are `normal` or `loop`. `normal` will play the file until completion then it stops. `loop` will continuously loop the the audio until the pin is triggered again. Default is `normal`.
225+
**[gpstartrigger]:** Control how the playback is assigned to this trigger. Valid settings are `press` or `hold`. Press will trigger the pin and play the track. Hold will also trigger the track however releasing the trigger will make it perform an associated action setup with **[gpstarplayback]**.
207226

208-
**gp#&#95;trigger:** Set how the audio is triggered. Valid settings are `press` or `hold`. With `press`, when you make contact between the trigger pin and the ground pin below it the audio file will play and will contiinue to play even when you release the contact between the trigger pin and ground pin. With `hold`, you need to make continuous contact between the trigger pin and ground pin for the audio to play, as releasing the contact will cause it to stop. Default is `press`.
227+
**[gpstarplayback]:** This sets the what the trigger action will do if the trigger is already playing a track. Valid settings are `stop`, `pause`, `restart`. When pause is used, triggering it again will resume the playback of the track where it left off.
209228

210-
**gp#&#95;file_number:** The track number on the microSD card. The default is the pin number of this trigger. For example, set this to `100` to play the wav file with the `100_` prefix.
229+
**[gpstartracks]:** The track number on the MicroSD Card. The default is the pin number of this trigger. For example, set this to 100 to play the wav file with the 100_ prefix.
211230

212-
**gp#&#95;volume:** The default volume for the track. Valid ranges are `0` to `-59`, with `0` being the loudest and `-59` being the most quiet. The default is `0`.
231+
**[gpstartrackvolume]:** The default volume for the individual track playback. Valid ranges are 0 to -59, with 0 being the loudest and -59 being the most quiet. The default is 0.
213232

214233
## Links
215234

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "GPStar Audio Serial Library",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "A serial communication control library for the GPStar Audio and GPStar Audio XL series of audio boards from GPStar Technologies.",
55
"keywords": "audio, serial, music, wav",
66
"authors":
@@ -25,4 +25,4 @@
2525
"frameworks": "arduino",
2626
"platforms": "*",
2727
"examples": "examples/*/*.ino"
28-
}
28+
}

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=GPStar Audio Serial Library
2-
version=1.2.0
2+
version=1.2.1
33
author=Michael Rajotte
44
license=GPL-3.0-or-later
55
maintainer=Michael Rajotte <michael.rajotte@gpstartechnologies.com>
@@ -8,4 +8,4 @@ paragraph=A serial communication control library for the GPStar Audio and GPStar
88
category=Device Control
99
architectures=*
1010
url=https://github.com/gpstar81/GPStarAudio-Serial-Library
11-
includes=GPStarAudio.h
11+
includes=GPStarAudio.h

0 commit comments

Comments
 (0)