Giter Club home page Giter Club logo

go-meltysynth's People

Contributors

kardianos avatar sinshu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go-meltysynth's Issues

Tests fail when using MELTYSYNTH environment variables

There's a typo in loadGM in testing_test.go

func loadGS(t *testing.T) *SoundFont {
	return loadSoundFont(t, envGS, defaultPathGS)
}

func loadGM(t *testing.T) *SoundFont {
	return loadSoundFont(t, envGS, defaultPathGM)
}

Should be return loadSoundFont(t, envGM, defaultPathGM)

main panics processing flourish.mid on MacOS Monterey

Overall, the code looks like nice work, however, I can't get the demo app (main.go) to run on MacOS Monterey. It builds with no error but panics while trying process flourish.mid. Seems like the []times slice is coming up empty.

michaels-mbp go-meltysynth % ./go-meltysynth  
panic: runtime error: invalid memory address or nil pointer dereference  
\[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1089c0d\]  
goroutine 1 \[running\]:  
github.com/sinshu/go-meltysynth/meltysynth.(\*MidiFile).GetLength(...)  
	/Users/mellis/go-meltysynth/meltysynth/midifile.go:368  
main.flourish()  
	/Users/mellis/go-meltysynth/main.go:70 +0x14d  
main.main()  
	/Users/mellis/go-meltysynth/main.go:15 +0x1c

Also, it would make life easier for folks who want to try it out if the main app didn't reference specific .sf2 and .mid files. At the very least, it should check the error return from os.Open().

System:
Model Name: MacBook Pro
Model Identifier: MacBookPro11,4
Processor Name: Quad-Core Intel Core i7
Processor Speed: 2.2 GHz
Memory: 16 GB
OS:
Darwin Kernel Version 21.6.0: Sun Nov 6 23:31:16 PST 2022; root:xnu-8020.240.14~1/RELEASE_X86_64 x86_64

Suggestions for sequencer API changes

Hello,

right now the MidiFileSequencer object can only play and stop. Also the Render() method gives no indication of how many non-zero samples were written before reaching the end of the file. I would be interested in the following:

  • a Length() or Duration() method that indicates the length of the file
  • a Tell() or Pos() method that indicates the current position in the file
  • a Seek() method to seek into the file (block granularity would be OK)

To avoid accuracy issues, I would also suggest that these methods handle a number of samples rather than a duration, so that the client application can directly use the data with Render().

Also note that seq.LoopIndex is not updated (and is currently unused).

What do you think? All these changes are fairly easy and I will gladly submit a PR, but Iโ€™d like to get your opinion first.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.