Skip to content

Commit 70f976d

Browse files
committed
Reduced reclaiming time to 2 seconds (fix some songs not playing until the end)
1 parent f34c5db commit 70f976d

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,55 @@ This project is a fork of [Pila's SteamControllerSinger](https://gitlab.com/Pila
55
## HOW TO
66

77
1. Turn on your Steam Controller
8-
98
2. Drag the midi file onto steamcontrollersinger executable
10-
119
3. When prompted, press ENTER
12-
1310
4. Enjoy!
1411

12+
### Where can I find midi songs?
1513

16-
## MORE INFORMATIONS
14+
You can find midi songs ready to be played with Steam Controller Singer in my [Personal Collection](https://mega.nz/#F!BWpEWKzB!r7WPw5bZ_domN4pk-FJsjg) (I'll keep updating it with more songs). You can also download midi songs from various websites such [musescore.com](https://musescore.com/), but they may or may not be ready to be played with Steam Controller Singer (see Midi files tips in that case).
1715

18-
Usage from command prompt :
19-
steamcontrollersinger [-r][-l DEBUG_LEVEL] [-i INTERVAL] MIDI_FILE"
16+
### Usage from command prompt:
17+
steamcontrollersinger [-r][-l DEBUG_LEVEL] [-i INTERVAL] MIDI_FILE
2018

2119
-i INTERVAL argument to choose player sleep interval (in microseconds). Lower generally means better song fidelity, but higher cpu usage, and at some point goidn lower won't improve any more. Default value is 10000
2220

2321
-l DEBUG_LEVEL argument to choose libusb debug level. Default is 0, no debug output. max is 4, max verbosity output
2422

2523
-r to enable repeat mode, which plays continously (restart the song when finished)
2624

25+
### Midi files tips:
2726

28-
Midi files tips :
29-
Notes from midi channel 0 are played on right haptic
30-
Notes from midi channel 1 are played on left haptic
31-
Notes from others channels are ignored
27+
Midi files may need to be edited with a software such [MidiEditor](https://www.midieditor.org/) to be correctly played with Steam Controller Singer following the next tips:
3228

33-
Avoid multiple notes active at the same time on the same channel, since haptic actuators can only play one note
29+
* Notes from midi channel 0 are played on right haptic
30+
* Notes from midi channel 1 are played on left haptic
31+
* Notes from others channels are ignored
32+
* **Avoid multiple notes active at the same time on the same channel**, since haptic actuators can only play one note at the time.
3433

3534
## CHANGELOG
35+
3636
[V1.7]
37-
- Fixed music stopped playing after a few seconds
37+
* Fixed music stopped playing after a few seconds
3838

3939
[V1.6]
40-
- Fixed major bugs in playback algorithm
40+
* Fixed major bugs in playback algorithm
4141

4242
[V1.5]
43-
- Changed debug level argument from -d to -l
44-
- Added -r argument to enable demo mode
45-
- Enhanced arguments parsing
46-
- Does not rely on Steam Controller duration anymore
47-
- Updated note display
48-
- Now stops playing when interrupting the process ( on Ctrl+C )
43+
* Changed debug level argument from -d to -l
44+
* Added -r argument to enable demo mode
45+
* Enhanced arguments parsing
46+
* Does not rely on Steam Controller duration anymore
47+
* Updated note display
48+
* Now stops playing when interrupting the process ( on Ctrl+C )
4949

5050
[V1.4]
51-
- Fixed a bug in MIDI librairie that would compute a null duration for notes when ON event and previous OFF event had the same timetick
51+
* Fixed a bug in MIDI librairie that would compute a null duration for notes when ON event and previous OFF event had the same timetick
5252

5353
[V1.3]
54-
- Added -iINTERVAL argument
55-
- Added -dDEBUG_LEVEL argument
54+
* Added -iINTERVAL argument
55+
* Added -dDEBUG_LEVEL argument
5656

5757
[V1.2]
58-
- Fixed being stuck on "Command error" when disconnecting controller while playing. Now continue playing (even if keep failing)
59-
- Removed the now deprecated 20ms note duration reduction
58+
* Fixed being stuck on "Command error" when disconnecting controller while playing. Now continue playing (even if keep failing)
59+
* Removed the now deprecated 20ms note duration reduction

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void playSong(SteamControllerInfos* controller,const ParamsStruct params){
217217
long currentTick = MidiFile_getTickFromTime(midifile,timeElapsedSince(tOrigin));
218218

219219
//Every 5 seconds, reclaim the controller to avoid timeouts
220-
if(timeElapsedSince(tRestart) > 5){
220+
if(timeElapsedSince(tRestart) > 2){
221221
tRestart = std::chrono::steady_clock::now();
222222
SteamController_Close(&steamController1);
223223
SteamController_Claim(&steamController1);

steamcontrollersinger

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)