On Mittwoch, 2. Juli 2008, percy tiglao wrote:
> The "spectrometer" plugin looks extremely useful... but not in its
> current state. So I'm doing a few touchups on the plugin right now to
> fit my needs. One particular feature that I'd really like is to add
> "labels" by clicking on points on the spectrometer's GUI. This way I
> can see key events on the spectrometer and break them down. (IE:
> separate drum beats from bells and what not)
>
> Question1: Are there any plugins/effects that offer this functionality
> (the ability to add labels) already?
> Question2: How exactly do labels work from a coding perspective? I see
> some references in the EDL object, but if someone gave me a starting
> point to look that would be great.

If I understand you correctly, then the labels that you want to add to the 
spectrometer have nothing to do with the labels on the timeline.

I suggest that you introduce keyframes in the plugin if it doesn't have them, 
yet. Then you store the label information in the keyframe data. You can look 
into other effects how the keyframe infrastructure works: You add a class 
with these functions (see plugins/titler/title.[Ch]):

        int equivalent(TitleConfig &that);
        void copy_from(TitleConfig &that);
        void interpolate(TitleConfig &prev, 
                TitleConfig &next, 
                int64_t prev_frame, 
                int64_t next_frame, 
                int64_t current_frame);

(interplate() need not necessarily do interpolation if it does not make 
sense.)

You implement in the PluginVClient-derived class ("the" plugin)

        int load_configuration();
        void save_data(KeyFrame *keyframe);
        void read_data(KeyFrame *keyframe);
        int load_defaults();
        int save_defaults();

How you display the labels is, of course, up to you.

> Question3: When I'm done, who/where should I submit the patch?

Post it here.

-- Hannes

_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra

Reply via email to