Giter Club home page Giter Club logo

libsmf's People

Contributors

stump avatar trasz 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libsmf's Issues

Bring back log message levels

These were removed with the glib removal. They should be restored.

(Some discussion of this point took place in #1.)

ABI-bump-related, so this goes on branch libsmf1.

SMF meta events should not reset running status

We use libsmf in Ardour. Recently got a bug report about a file from EZ Drummer that would not load correctly. After a lot of investigation and comparison of parsing routines in midicomp, I realized that the issue was EZ Drummer's use of running status, and the presence of Meta events. The meta event would reset track->last_status to 0xff, leading to much craziness as the next event (a 2 byte note off, using running status) was parsed.

This is the commit from the ardour codebase. Sorry that we don't upstream more of our patches to libsmf, but this one seemed important enough to do so;

`commit 1f86876a0d91c28e00486332ea2480d100a0b4ca (HEAD -> new-ripple-arch)
Author: Paul Davis [email protected]
Date: Tue Jun 22 14:08:58 2021 -0600

SMF meta-events do not set running status while parsing the file

diff --git a/libs/evoral/libsmf/smf_load.c b/libs/evoral/libsmf/smf_load.c
index 2528c328fa..6a6223de0c 100644
--- a/libs/evoral/libsmf/smf_load.c
+++ b/libs/evoral/libsmf/smf_load.c
@@ -625,7 +625,9 @@ parse_next_event(smf_track_t *track)

c += len;
buffer_length -= len;
  • track->last_status = event->midi_buffer[0];
  • if (!smf_event_is_metadata (event)) {

  •   track->last_status = event->midi_buffer[0];
    
  • }
    track->next_event_offset += c - start;

    smf_track_add_event_delta_pulses(track, event, etime);
    `

Could you add a License file please

A LICENSE file is welcomed for packaging (RPM, DEB, ...)
it eases the acceptance in Official Repos.
If I am not mistaken, Github allows you to add this file just by choosing in a dropdown list :-)
Thanks

Make a new release

The current release, 1.3.0, embeds copies of config.guess and config.sub that are too old to identify Apple Silicon machines. Making a new release with current autotools, and whatever accumulated fixes you've already made over the years since 1.3.0, would be a good idea.

How to include and build this, and is the only way to use this through installing it?

I am interested in using this library, and I first tried to import the smf.h to my program, but then it complains about functions such as smf_load() not existing:

smftest.c:(.text+0x15): undefined reference to smf_load'
`

I'm compiling with:

gcc smftest.c $(pkg-config --cflags --libs glib-2.0)

Then I read that the home page suggests to do a make install. Is this the only way to use the library? What about doing the build to some other location than:

usr/bin/mkdir: cannot create directory โ€˜/usr/local/lib64โ€™: Permission denied

Question: Is it possible to compile libsmf under Windows using MSYS2?

When I tried to run the first line in the readme instructions, I got the following error:

$ ./autogen.sh
autoreconf-2.71: export WARNINGS=
autoreconf-2.71: Entering directory '.'
autoreconf-2.71: configure.ac: not using Gettext
autoreconf-2.71: running: aclocal --force
Can't exec "aclocal": No such file or directory at /usr/share/autoconf-2.71/Autom4te/FileUtils.pm line 274.
autoreconf-2.71: error: aclocal failed with exit status: 1

I'm not very familiar with 'autogen' and 'configure', so maybe I'm doing something wrong.

BTW, I downloaded the 'libsmf1' branch, since I don't know what to use for 'glib' (or even what it is). Is this branch up-to-date?

Thanks.

FPS timing

Is this viable? My files are, for some reason, in FPS format, not PPQN, and I do not know how to convert them.

Decide what to do with the glib dependency.

libsmf as it exists now uses glib. Some people consider this OK; some people consider this undesirable.

I'm currently in the OK camp. I am thinking of using it to simplify error handling, remove utility code, preserve the ability to redirect log output to an arbitrary function, and deal with potential libc mismatches (a mostly Windows-specific problem, but an insidious one) for the functions that currently return malloc()'d memory and expect the caller to free() it when finished with it. Though we could do that last part by just adding a function that wraps free().

Arguments against continuing to use glib are that we currently use fairly little of it, it wouldn't be too hard to reimplement the parts we use (though the log message handling would of course become incompatible with the glib logging system without extra hacks), and it's a somewhat heavy dependency to be dragging around in certain contexts.

I like glib and want to keep it and take further advantage of it in libsmf , but I could be convinced not to do this.

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.