0.0
No commit activity in last 3 years
No release in over 3 years
The output module implements all the objects and facilities used to talk to vissen sinks.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0
~> 3.4
~> 0.52
~> 0.16
~> 0.9
 Project Readme

🥀 Vissen Output

Gem Version Build Status Inline docs Documentation

The Vissen Output library implements the objects used by the Vissen Engine to talk to the various sinks.

Installation

Add this line to your application's Gemfile:

gem 'vissen-output'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vissen-output

Usage

include Vissen::Output

# First we create a grid shaped context with 64 points.
context = Context::Grid.new 8, 8

# We then create a vixel stack with a single layer.
stack = VixelStack.new context, 1

# We go through each vixel in the layer and randomize its
# palette value (p). We also set the layer palette to
# palette number 1.
stack.layers[0].tap do |layer|
    layer.palette = 1
    layer.each do |vixel|
        vixel.i = 1.0
        vixel.p = rand
    end
end

# Finally we allocate a pixel buffer and render to it.
pixel_buffer = stack.pixel_buffer
stack.render pixel_buffer

Please see the documentation for more details.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/midi-visualizer/vissen-output.

License

The gem is available as open source under the terms of the MIT License.